Q:

Write a C program that accepts two integers from the user and calculate the product of the two integers

0

Write a C program that accepts two integers from the user and calculate the product of the two integers.

Test Data :
Input the first integer: 25
Input the second integer: 15
Expected Output:
Product of the above two integers = 375

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <stdio.h>
int main() 
   {
	int x, y, result;
    printf("\nInput the first integer: "); 
    scanf("%d", &x);
    printf("\nInput the second integer: ");
    scanf("%d", &y);
    result = x * y;
	printf("Product of the above two integers = %d\n", result);
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Basic Declarations and Expressions exercises

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a C program that accepts two item’s weight... >>
<< Write a C program that accepts two integers from t...