WAP to accept a number and print its multiplication table. ( computer programs.)
Answers
Answered by
3
Java::
import java.util.Scanner;
public class Brainly {
public static void main(String [] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
for (int i = 1; i <= 10; i++) {
System.out.println(x + " * " + i + " = " + (x * i));
}
}
}
Python::
x = int(input())
for i in range(1, 11):
print(str(x) + " * " + str(i) + " = " + str(x * i))
I hope that my answer helps you...
Similar questions