Home› C Programming Language for Problem Solving› / Programs / Program to find multiplication of two numbers.
🚀 Programming Example

Program to find multiplication of two numbers.

3,566 Views
Beginner
Code Snippet

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:

No previous program
No next program

💻 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);
    
}

🖥 Program 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
No previous program
No next program
📚 Learning Subject

Master Programming Through Practical Examples

Improve your coding logic, problem-solving skills and programming confidence by practicing real-world examples with explanations.

🎯 How to learn from this example

First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.

🔥 Practice suggestion

Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.