Java - Scanner Exercises
1. Grade Calculator
Design a program that calculates the average of three test scores. Prompt the user to enter three test scores and then calculate and display the average. (5 Marks)
2. Area of a circle
Create a program that calculates the area of a circle. Ask the user to input the radius and then compute and display the area. Use the built-in constant PI for your calculation. (5 Marks)
3. Simple Calculator
Create a simple calculator program that takes two numbers as input from the user and performs addition, subtraction, multiplication, and division. Display the results. (5 marks)
4. Sales Tax
Create a program that takes the price of an item from the user and calculates the sales tax. Create a constant variable to store the value of the sales tax as a decimal. Display the result rounding to 2 decimal places. (5 marks)
Design a program that calculates the average of three test scores. Prompt the user to enter three test scores and then calculate and display the average. (5 Marks)
2. Area of a circle
Create a program that calculates the area of a circle. Ask the user to input the radius and then compute and display the area. Use the built-in constant PI for your calculation. (5 Marks)
3. Simple Calculator
Create a simple calculator program that takes two numbers as input from the user and performs addition, subtraction, multiplication, and division. Display the results. (5 marks)
4. Sales Tax
Create a program that takes the price of an item from the user and calculates the sales tax. Create a constant variable to store the value of the sales tax as a decimal. Display the result rounding to 2 decimal places. (5 marks)
Total: 20 Marks