C Program to multiply two numbers

Get two integer numbers, multiply both the integers and dispaly the product.

Sample Input 1:

5 6 

Sample Output 1:

30

Sample Input 2: 

65 10

Sample Output 2:

650

Try your Solution

Strongly recommended to Solve it on your own, Don't directly go to the solution given below.

#include<stdio.h> int main() { //write your code here }

Program or Solution

				
			
					
//Program to Multiplication of two numbers
#include<stdio.h>
int main()
{
	int num1,num2,product;
	printf("Enter two numbers:");
	scanf("%d %d",&num1,&num2);
	product=num1*num2;
	printf("Product of two numbers: %d",product);
	return  0;
}
			
				
			

Program Explanation

Get two integers a and b (using scanf statement) multiply a and b, then store the product in c (c=a*b) print the value of c (using printf statement)

Comments