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 using while

#include<stdio.h>

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

Output

Write a program to print the multiplication table of an integer given by the user using while
Multiplication of 2

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments