This is a simple java program for beginners. The program write the table of specific number that user enter in console.
Source Code
import java.util.Scanner; public class Table_writing{ public static void main(String[] args) { Scanner input = new Scanner (System.in); int num; System.out.print( " Enter Number to Write its Table : "); num = input.nextInt(); for (int i =1;i<11;i++) { System.out.println(num + " * " + i + " = " +num*i); } } }
0 comments:
Post a Comment