Computer Science, asked by Anonymous, 1 month ago

WAP to display table of any number entered by the user at run time.​

Answers

Answered by BrainlyProgrammer
3

Answer:

//Assuming it's Java programming

import java.util.*;

class Table{

public static void main (String ar []){

Scanner sc=new Scanner (System.in);

System.out.println("Enter a number");

int n=sc.nextInt();

for(int I=1;I<=10;I++){

System.out.println(I+"×"+n+"="+(I*n));

}

}

}

Logic:-

  • Run a loop from 1 to 10
  • multiple the number input with I
  • print the product
Attachments:
Answered by Anonymous
1

ᥲᥒ᥉ᥕꫀℝ❤

Enter an integer: 9

9 * 1 = 9

9 * 2 = 18

9 * 3 = 27

9 * 4 = 36

9 * 5 = 45

9 * 6 = 54

9 * 7 = 63

9 * 8 = 72

9 * 9 = 81

9 * 10 = 90

━━━━━━━━━━━━━

Enter an integer: 12

Enter the range: 8

12 * 1 = 12

12 * 2 = 24

12 * 3 = 36

12 * 4 = 48

12 * 5 = 60

12 * 6 = 72

12 * 7 = 84

12 * 8 = 96

hope it helps❤

Similar questions