Input in Java
Input in Java
Write a Java program that takes the radius of a circle as input from
the user and calculates the area.
2. Write a Java program to input your name and print it.
3. Write a Java program to input a number and print its square.
4. Write a Java program to input a number and print its cube.
5. Write a Java program that takes two integer inputs from the user and
performs basic arithmetic operations (addition, subtraction,
multiplication, and division).
6. Write a Java program that takes marks in four subjects, name and
rollno as input from the user and calculates the average and
Percentage
7. Write a Java program that takes a temperature in Celsius as input
and converts it to Fahrenheit. (fahrenheit = (celsius * 9/5) + 32)
8. Write a Java program that takes the radius of a circle as input from
the user and calculates the area.
9. Write a Java program that takes two integer inputs from the user and
prints their quotient.
10. Write a Java program that takes the length and width of a
rectangle as input and prints its area.
11. Write a Java program that takes the length and width of a
rectangle as input and prints its perimeter.
12. Write a Java program that takes the principal amount, rate of
interest, and time as input and prints the simple interest.
13. Write a Java program that takes the radius of a circle as input
and prints its area.
14. Write a Java program that takes the radius of a circle as input
and prints its circumference.