Computer Science, asked by Ayush0009, 1 year ago

WAP in java to find out the maximum and minimum within 10 user given number using 4 variables and loop. ( must use scanner class).

Answers

Answered by Sidyandex
0

The first line, import input scanner: slow input input but the one most simple.

Second and third line, give a description of the class and the main method.

The fourth line, creating a scanner instance by getting ready to take the input.

The fifth line, a variable zero to be initialized, so that we could sum up all the incoming integers into this variable.

The sixth line, run a loop ten number of times.

The seventh line, take and add input to the sum variable. Ninth line final printing the sum to the console.

Similar questions