package algorithmsample22;
import java.util.Scanner;
/**
*
* @author Nurhak
*/
public class AlgorithmSample22 {
public static void main(String[] args) {
int number = 0;
int result = 1;
String data = "";
try {
Scanner scan = new Scanner(System.in);
for (int i = 1; i <= 5; i++) {
System.out.println("Enter the number: "+i);
data = scan.nextLine();
number = Integer.parseInt(data);
result = result * number;
}
System.out.println("Multiple of the numbers that are inserted by the user: " + result);
} catch (Exception e) {
System.err.print(e);
}
}
}
Comments
Post a Comment