• Tutorials
  • DSA
  • Data Science
  • Web Tech
  • Courses
September 08, 2022 |7.8K Views

C Program to Multiply Two Numbers

Description
Discussion

In this video, we will write a C program to multiply two numbers. In math, multiplication is the method of finding the product of two or more numbers. 

Example:
Input numbers: 2, 3
Output = 6

Approach:
Step 1: Enter two integer numbers and the input is scanned using the scanf() function and stored in the variables A and B.
Step 2: The variables A and B are multiplied using the arithmetic operator * and the product is stored in the variable C.
Step 3: Print the output.

Here we see 3 different methods for multiplying two numbers:

  1. Using a multiplication operator
  2. Using loop and addition operator
  3. Using recursion and addition operator