Practice Sheet-2
Java Basics (Print Statement)
1. Write a program to enter two numbers and perform all arithmetic
operations.
2. Write a program to enter length and breadth of a rectangle and find its
perimeter and area.
3. Write a program to enter radius of a circle and find its diameter,
circumference and area.
4. Write a program to enter length in centimeter and convert it into meter
and kilometer.
5. Write a program to convert days into years, weeks and days.
6. Write a program to enter base and height of a triangle and find its area.
7. Write a program to calculate area of an equilateral triangle.
8. Write a program to enter marks of five subjects and calculate total,
average and percentage.
9. Write a program to swap two numbers by using third variable?
10.Write a program to swap two numbers without using third variable?
STERLING INSTITUTE
G-5, 150 New Azad Nagar Behind Akashwani, Daly College Road Indore – 452001
Contact: +91 9109913455
www.sterlinginstitute.in