In this blog, you find how to solve the Multiplication Table in C. So, if you are new on my channel the please visit all the pages here is code related to the Python, Cisco Packet Tracer, Scilab, and Data Strcture, and many more things.
| Multiplication Table in C |
YouTube link-https://youtube.com/shorts/sZH_CFTcEEY?feature=share
👉Code-
#include <stdio.h>
int main()
{
int a;
printf("enter the number you wants\n");
scanf("%d", &a);
printf("%d*1 = %d\n", a, a*1);
printf("%d*2 = %d\n", a, a*2);
printf("%d*3 = %d\n", a, a*3);
printf("%d*4 = %d\n", a, a*4);
printf("%d*5 = %d\n", a, a*5);
printf("%d*6 = %d\n", a, a*6);
printf("%d*7 = %d\n", a, a*7);
printf("%d*8 = %d\n", a, a*8);
printf("%d*9 = %d\n", a, a*9);
printf("%d*10 = %d\n", a, a*10);
return 0;
}
\
Another way to write Multiplication Table in C
👉Code-
// Multiplication Table
#include <stdio.h>
int main()
{
int i,num;
printf("Enter the value of the table");
scanf("%d",&num);
printf("Now the Table is:\n");
for (int i = 0; i < 10; i++)
printf("%d * %d =%d\n", num,i,num*i);
return 0;
}
👉Output-
enter the number you wants
6
6*1 = 6
6*2 = 12
6*3 = 18
6*4 = 24
6*5 = 30
6*6 = 36
6*7 = 42
6*8 = 48
6*9 = 54
6*10 = 60
Thanks for visiting on the Red Code.
0 Comments
Thanks for comment ! we get touch with you soon.