C Program to find the product of two integer numbers
User enters integer values for variable a and b, multiply the two values and stores it in variable 'product'. The value at variable 'product' is printed on the console.
Program
#include<stdio.h>
void main()
{
int a, b, product;
printf("Enter two numbers:\n");
printf("a:\t");
scanf("%d", &a);
printf("b:\t");
scanf("%d", &b);
product = a * b;
printf("Product of %d and %d is %d\n", a, b, product);
}
Output
Enter two numbers:
a: 8
b: 12
Product of 8 and 12 is 96