28) Write a program to print the Table of a number?
import java.util.*;public class Table{public static void main(String args[ ]){Scanner sc = new Scanner (System.in);System.out.println("Enter a number");int a = sc.nextInt();System.out.println("\nTABLE of "+a);for(int i =1;i<=10;i++){System.out.println(a+"x"+i+" = "+a*i);}}}
No comments:
Post a Comment
if you have any doubts, Please let me know.
Your Truly
Shashank Porwal