Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java can toy modify this program so it reada 3 integer values from the keyboard. it should still compute the aum and average and

In Java can toy modify this program so it reada 3 integer values from the keyboard. it should still compute the aum and average and print these. label the output and your source code image text in transcribed
JUULOU Computation X Compile Undo Cut Copy Source Co public class Computation public static void main(String Il/Define a constant final int NUM_OF_GRADES = 3; // Define integer Value int grade1, grade2, grade3; int sum; double average; 11 Interger values grade1 = 2; grade2 = 3; grade3 = 2; sum = grade1 + grade2 + grade3; average = (double) sum / NUM_OF_GRADES; 7/Print the sum and average System.out.println("The sum is" + sum): System.out.println("The average is" + average)

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

What Is A Database And How Do I Use It

Authors: Matt Anniss

1st Edition

1622750799, 978-1622750795

More Books

Students also viewed these Databases questions

Question

Define Administration?

Answered: 1 week ago