Home / Programs / Program to find multiplication of two numbers.
Programming Example

Program to find multiplication of two numbers.

👁 3,527 Views
💻 Practical Program
📘 Step by Step Learning

In this program we will show you how to multiply one number with another. Take two variable a and b and use multiplication operator (*) to multiply them and store it in another variable s, finally print the variable using printf function to see the result.

Flow chart

flow chart for multiplication
Figure:

Program Code

#include"stdio.h"
 
 void main()
	{
        // declare variable
	int num1, num2, multiResult; 

        // take input from user
	printf("Enter two no: ");
 	scanf("%d%d",&a,&b);
        
         // multiplication operation
	multiResult = a * b;

         // print result
       printf("Multiplication result=%d \n", multiResult);
    
}

Output

Enter two no: 8 3
Multiplication result=24
Press any key to continue . . .

Explanation

Algorithm

  • Step 1: Start
  • Step 2: Declare variable number 1, number 2 and multiResult
  • Step 3: Read Variable number 1, number 2
  • Step 4: Perform operation (subResult = num1 * num2)
  • Step 5: Print multiResult variable
  • Step 7: Stop

How to learn from this program

First read the algorithm, then study the program code line by line. After that, compare the code with the output and finally go through the explanation. This approach helps learners understand both the logic and the implementation properly.