multiplicationin c
#include <stdio.h>
int main() {
int num1, num2, product;
printf("Enter two numbers: ");
scanf("%d %d", &num1, &num2);
product = num1 * num2;
printf("The product is: %d\n", product);
return 0;
}
This is a simple C program that multiplies two numbers entered by the user and prints the product. The program prompts the user to enter two numbers, reads the input using scanf
, calculates the product using the *
operator, and then prints the result using printf
.