Answer to Question #261864 in C for Amraj

Question #261864

Write a program in C to display the multiplication table of a given integer. Go to the editor


Test Data :


Input the number (Table to be calculated) : 15


Expected Output :


15 X 1 = 15


...


...


15 X 10 = 150

1
Expert's answer
2021-11-09T11:51:39-0500


#include <stdio.h>
#include <stdlib.h>


int main(){
	int number,i;
	printf("Input the number (Table to be calculated): ");
	scanf("%d",&number);
	
	for(i=1;i<=10;i++){
		printf("%d X %d = %d\n",number,i,(i*number));	
	}


	getchar();
	getchar();
	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS