MULTIPLICATION TABLE
import java.util.Scanner;
public class Mohamed_Hafiz_Multiplication_Table {
public static void main(String[] hafiz) {
Scanner Hafiz = new Scanner(System.in);
System.out.print("Enter a number to display its multiplication table: ");
int number = Hafiz.nextInt();
System.out.println("Multiplication table for " + number + ":");
for (int i = 1; i <= 24; i++) {
System.out.println(number + " x " + i + " = " + (number * i));
}
}
}
Submitted By: Mohamed Alpha Kamara
B. SC. Information Technology
I - 24 - 64179
Comments
Post a Comment