Social Sciences, asked by muskan481367, 1 year ago

java program to print a table of the given number with output​

Answers

Answered by durbadatta1715
2

* 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"); } } }

OUT PUT : the above pic

HIT IT THE BRAINLIEST ......

Attachments:
Similar questions