Write a Java program to demonstrate
(a*2)
(a*3)
(a*20)
Answers
Answered by
1
Explanation:
import java.util.Scanner; public class Exercise5 { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Input first number: "); int num1 = in.nextInt(); System.out.print("Input second number: "); int num2 = in.nextInt(); System.out.println(num1 + " x " + num2 + " = " + num1 * num2); } }
Similar questions