WAP to print the multiplication table of an integer given by the user

Write a program to print the multiplication table of an integer given by the user.

#include<stdio.h>

int main() {
	int i=1,n;
	printf("Enter any number: ");
	scanf("%d",&n);
	do{
		printf("%d x %d = %d\n",n,i,n*i);
		i++;
	}while(i<=10);
	return 0;
}

Output

WAP to print the multiplication table of an integer given by the user
Multiplication of 2
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments