Algorithm
- Take Three Variable, number1, number2, summation.
- Assign values on number1 and number2.
- Make
multiplication = number2 * number1
. - Print multiplication value.
Code Examples
#1 Multiplication Code Example Basic
Code -
C Programming
#include <stdio.h>
int main(){
int multiplication = 0;
int number1 = 100, number2 = 2;
multiplication= number1 * number2;
printf("Multiplication = %d\n", multiplication);
return 0;
}
Copy The Code &
Try With Live Editor
Output
Multiplication = 200
#2 Multiplication Code Example with Input
Code -
C Programming
#include <stdio.h>
int main(){
int multiplication = 0;
int number1, number2 = 0;
printf("Enter Number 1: ");
scanf("%d", &number1);
printf("Enter Number 2: ");
scanf("%d", &number2);
multiplication= number1 * number2;
printf("Multiplication = %d\n", multiplication);
return 0;
}
Copy The Code &
Try With Live Editor
Input
5 4
Output
Multiplication = 20
Demonstration
Simple Subtraction Progarm in C Programming Example.
First Take three variables - number1, number2 and subtraction.
Then apply the simple algorithm for multiplication program -
multiplication= number2 * number1;
That's the basic multiplication program