Header Ads Widget

C program to print table of user’s choice

 C program to print table of user’s choice

Given a number , write a program to print the table of the number .

Sample input

 3

Sample output

 3 6 9 12 15 18 21 24 27 30

C program to print table of user’s choice

The objective of the code is to print the table of a number given by user .

Code(C):-

#include<stdio.h>
int main()
{
int i,n;
printf("Enter a number : ");
scanf("%d",&n);
for(i=1;i<=10;i++)
{
printf("%d ",n*i);
}
}

Output:-

Enter a number : 3
3 6 9 12 15 18 21 24 27 30


Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-

Post a Comment

0 Comments