Multiplication table of a given number program in C Programming Solution

Multiplication table of a given number program in C Programming

In this tutorial, we are going to make a C Program that will print the Multiplication table of a given number with a complete step-by-step process code and explanation.


Code


#include<stdio.h>
#include<conio.h>

void main()
{

      int input, i;


      printf(“Enter any number:”);
      scanf(%d”, &input);

      for(i=1; i<=10: i++);
           printf(“n%dx%d”, inpuit, i, input*i);

      getch();

}


Explanation


Here in the above Program first we include the studio.h and conio.h header file. and after that, we declare the main function with a return type of void. and then we declare two integer variables input and i. after that print the “Enter any number:” message using printf() function.

After that, we use the scanf() function to enter the value of the input variable. and then using for loop we print the multiplication table of the given input number. and then we use the getch() function to hold the output screen till pressing any key.

freshersonline

Also read : Starlink should be fully mobile by the end of 2021
Also read : Can I invest in Cryptocurrency?

freshersonline

Multiplication table of a given number program in C Programming
#Multiplication #table #number #program #Programming

Leave a Comment