Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(JAVA) Write a program that accepts user input for five values of type double, and prints their average. You do not need to declare five

(JAVA) Write a program that accepts user input for five values of type double, and prints their average. You do not need to declare five different variables, think of how you can get away with a single variable. Do not use any while or for loops. The second part of your program will be to figure out whether the average of these 5 numbers results in grade 100>A>=90, 90>=B>=80, 80>C>=70, 70>D>=60 or F<60, you are required to use a switch-case statement with cases for each grade.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions