Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Java Program Example - Print Table of Number */
- import java.util.Scanner;
- public class JavaProgram
- {
- public static void main(String args[])
- {
- int num, i, tab;
- Scanner scan = new Scanner(System.in);
- System.out.print("Enter a Number : ");
- num = scan.nextInt();
- System.out.print("Table of " + num + " is\n");
- for(i=1; i<=10; i++)
- {
- tab = num*i;
- System.out.print(num + " * " + i + " = " + tab + "\n");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement