Question: Write a main method that creates three double variables called a, b and c. The program assigns the values 3 to a, 4 to b
Write a main method that creates three double variables called a, b and c. The program assigns the values 3 to a, 4 to b and 2 to c. The program then computes the average of a, b, c and assigns the value to a variable called average. The program then increases a by 1, increases b by 4 and increases c by 2. The program then prints the new values of a, b, c and their average. Change the starting values assigned to a, b and c to 10, 12, and 9 respectively and run the program again (and include this in your output of the program as well). The program must print the new values. Don't worry about controlling for the decimal. (For Java, Better if you use jGrasp application)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
