C Program to get the product of two numbers
C Program to calculate the product of two numbers :
PROGRAM:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#include<stdio.h> int main() { int x,y; int result; printf("\n Enter the first number : "); scanf("%d",&x); //reading 1st number from user printf("\n Enter the second number: "); scanf("%d",&y); // reading 2nd number from user result = x * y; // storing the product in result printf("\n The product of two numbers is: %d \n",result); return 0; } |
Sample Output: ( using GNU GCC Compiler with Code Blocks IDE )
Enter the first number : 5
Enter the second number: 5
The product of two numbers is: 25