Computer Science, asked by tkbhaumik28, 23 hours ago

Write a C program to take a number from the output and print the table of that number
please give me output and input as well.​

Answers

Answered by MrTSR
2

Correct question:-

  • Write a C program to take a number from the input and print the table of that number.

C0DE

#include<stdio.h>

int main(){

   int no;

   printf("\n Enter any no : ");

   scanf("%d",&no);

   for(int i=1; i<=10; i++)

   printf("\n %d * %d = %d",no,i, no * i);

   return 0;

}

0UTPUT

Enter any no : 5

5 * 1 = 5

5 * 2 = 10

5 * 3 = 15

5 * 4 = 20

5 * 5 = 25

5 * 6 = 30

5 * 7 = 35

5 * 8 = 40

5 * 9 = 45

5 * 10 = 50

Attachments:
Answered by AkhileshCR7
0

Answer:

Correct question:-

  • Write a C program to take a number from the input and print the table of that number.

C0DE

#include<stdio.h>  

int main(){  

  int no;  

  printf("\n Enter any no : ");  

  scanf("%d",&no);  

  for(int i=1; i<=10; i++)  

  printf("\n %d * %d = %d",no,i, no * i);  

  return 0;

}

0UTPUT

Enter any no : 5

5 * 1 = 5

5 * 2 = 10

5 * 3 = 15

5 * 4 = 20

5 * 5 = 25

5 * 6 = 30

5 * 7 = 35

5 * 8 = 40

5 * 9 = 45

5 * 10 = 50

Hope it helps you!

Please mark me a brainlist!

Attachments:
Similar questions