0% found this document useful (0 votes)
3 views15 pages

IT'25 Java Practical

The document outlines a series of programming tasks, including printing 'Hello World', calculating the sum and average of five numbers, checking if a number is even or odd, and finding the area and perimeter of shapes. It also includes tasks for calculating simple interest, printing cubes of numbers, checking for leap years, and creating a calculator using switch case. Each task is presented with a syntax section and an expected output format.

Uploaded by

Eshu 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 views15 pages

IT'25 Java Practical

The document outlines a series of programming tasks, including printing 'Hello World', calculating the sum and average of five numbers, checking if a number is even or odd, and finding the area and perimeter of shapes. It also includes tasks for calculating simple interest, printing cubes of numbers, checking for leap years, and creating a calculator using switch case. Each task is presented with a syntax section and an expected output format.

Uploaded by

Eshu 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

WRITE A PROGRAMME TO PRINT “HELLO WORLD”

SYNTAX:-

OUTPUT:-
WRITE A PROGRAM TO FIND SUM AND AVERAGE OF FIVE NUMBERS
SYNTAX:-

OUTPUT:
WRITE A PROGRAM TO CHECK WHETHER THE ENTERED NUMBER IS
EVEN OR ODD
SYNTAX:-

OUTPUT:-
WRITE A PROGRAM TO FIND AREA AND PERIMETER OF RECTANGLE
AND CIRCLE (LENGTH, BREADTH, RADIUS SHOULD BE ENTERED BY THE
USER)
SYNTAX:-
Circle

Rectangle
OUTPUT:-
Circle

Rectangle
WRITE A PROGRAM TO FIND SIMPLE INTEREST
SYNTAX:-

OUTPUT:-
WRITE A PROGRAM TO PRINT CUBES OF 1 TO 30 NUMBERS USING DO
WHILE, WHILE, AND FOR LOOP
SYNTAX:-
Do While

While

For Loop
OUTPUT:-
Do While

While

For Loop

WRITE A PROGRAM TO CHECK WHETHER A GIVEN YEAR IS A LEAP


YEAR OR NOT
SYNTAX:-

OUTPUT:-
The year is a Leap Year

The year is not a Leap Year

WRITE A PROGRAM TO FIND THE LARGEST NUMBER AMONG THREE


NUMBERS USING NESTED IF
SYNTAX:-

OUTPUT:-

WRITE A PROGRAM TO MAKE A CALCULATOR USING SWITCH CASE


SYNTAX:-
OUTPUT:-
Sum
Difference

Quotient

Product

WRITE A PROGRAM TO FIND CUBE OF A NUMBER USING WHILE LOOP


SYNTAX:-
OUTPUT:-

WRITE A PROGRAM TO PRINT 1 TO 100 EVEN AND ODD NUMBERS


USING WHILE LOOP
SYNTAX:-
Even Loop

Odd Loop

OUTPUT:-
Even Loop
Odd Loop

You might also like