Multiply 3 Variables
unknown
java
a year ago
588 B
5
Indexable
import java.util.Scanner;
public class Multiply {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int sumatotal;
System.out.print("Enter the first number: ");
int FNO = scanner.nextInt();
System.out.print("Enter the second number: ");
int SNO = scanner.nextInt();
System.out.print("Enter the third number: ");
int TNO = scanner.nextInt();
sumatotal = FNO*SNO*TNO;
System.out.println("The product of the three numbers is: " + sumatotal);
scanner.close();
}
}
Editor is loading...
Leave a Comment