0% found this document useful (0 votes)
3 views

java file - Copy - Copy

The document outlines a series of Java programming exercises completed by Pranjal Jain, a BTech-CSE student at Mohanlal Sukhadia University. Each program focuses on fundamental programming concepts, including printing text, arithmetic operations, variable swapping, factorial calculation, number reversal, star patterns, and leap year checking. The document serves as a practical lab assignment for the Java course.

Uploaded by

Pranjal Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

java file - Copy - Copy

The document outlines a series of Java programming exercises completed by Pranjal Jain, a BTech-CSE student at Mohanlal Sukhadia University. Each program focuses on fundamental programming concepts, including printing text, arithmetic operations, variable swapping, factorial calculation, number reversal, star patterns, and leap year checking. The document serves as a practical lab assignment for the Java course.

Uploaded by

Pranjal Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

INSTITUTE OF ENGINEERING AND TECHNOLOGY

Mohanlal Sukhadia University , Udaipur


Name- Pranjal Jain | Class- BTech-CSE (IV Sem) | Subject- Java Lab

PROGRAM-1
Write a program to print “Hello World”.

Output:
INSTITUTE OF ENGINEERING AND TECHNOLOGY
Mohanlal Sukhadia University , Udaipur
Name- Pranjal Jain | Class- BTech-CSE (IV Sem) | Subject- Java Lab

PROGRAM-2
Write a program to add two numbers using Scanner.

Output:
INSTITUTE OF ENGINEERING AND TECHNOLOGY
Mohanlal Sukhadia University , Udaipur
Name- Pranjal Jain | Class- BTech-CSE (IV Sem) | Subject- Java Lab

PROGRAM-3
Write a program to swap two numbers using third variable.

Output:
INSTITUTE OF ENGINEERING AND TECHNOLOGY
Mohanlal Sukhadia University , Udaipur
Name- Pranjal Jain | Class- BTech-CSE (IV Sem) | Subject- Java Lab

PROGRAM-4
Write a program to multiply two floating point numbers.

Output:
INSTITUTE OF ENGINEERING AND TECHNOLOGY
Mohanlal Sukhadia University , Udaipur
Name- Pranjal Jain | Class- BTech-CSE (IV Sem) | Subject- Java Lab

PROGRAM-5
Write a program to find the factorial of the given number.

Output:
INSTITUTE OF ENGINEERING AND TECHNOLOGY
Mohanlal Sukhadia University , Udaipur
Name- Pranjal Jain | Class- BTech-CSE (IV Sem) | Subject- Java Lab

PROGRAM-6
Write a program to find the reverse of a number.

Output:
INSTITUTE OF ENGINEERING AND TECHNOLOGY
Mohanlal Sukhadia University , Udaipur
Name- Pranjal Jain | Class- BTech-CSE (IV Sem) | Subject- Java Lab

PROGRAM-7
Write a program to print the pyramid star pattern.

Output:
INSTITUTE OF ENGINEERING AND TECHNOLOGY
Mohanlal Sukhadia University , Udaipur
Name- Pranjal Jain | Class- BTech-CSE (IV Sem) | Subject- Java Lab

PROGRAM-8
Write a program to check whether the given year is leap year or not.

Output:

You might also like