Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

TUTORIAL-1

A lab Submitted
in Partial Fulfilment of the Requirements
for the Degree of
Bachelor of Technology / BTech (CSE)

As part of “JAVA PROGRAMMING ” course


By
Harsh Singh
To
Dr. Arpit Bhardwaj
Output- 2

Ouput-Error

If (“) not before bml university then


Output BML UNIVERSITY
Otherwise error;

Output:-10
Output-
A=72 b=-97
A=72 b=-98

Output -Both are not equal


Output-University

Output-Bennett University
Output-not b

Output-BMLUniversity
Output-Error

Output-Gurugram
Output-
CSE
ECE
MECH
BIO

Output-Error;
Output-

0, 1, 2, 3

Output-21

Output- 0 6, 1 5, 2 4, 3 3, 4 2,
Output- Now i value and j value: 0 6, 1 5, 3 3, 6 0,

Output- 6 and 3

15

Output-

Error
Output-Cse

BML UNIVERSITY

Output- BML UNIVERSITY………..Infinte time;

Output-Error

Output-11
Output-2

Output-36

Output-Error
Output-
public class Conditonal {
public static void main(String[] args)
{
for (int i = 0; i <= 5; i++) { int alphabet = 65; for (int j = 5; j > i; j--)
{
System.out.print(" ");
}
for (int k = 0; k <= i; k++)
{
System.out.print((char) (alphabet + k) + " ");
}
System.out.println();
}
}
}

You might also like