Input
1. First number
2. Second number
3. Third number
Output
The first three lines will contain message prompts to input the three numbers.
The last line contains the product of the three numbers with 1 decimal place.
Enter·the·first·number:·1.6
Enter·the·second·number:·-2
Enter·the·third·number:·-1
Product·=·3.2
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(){
float number1,number2,number3,product;
printf("Enter the first number: ");
scanf("%f",&number1);
printf("Enter the second number: ");
scanf("%f",&number2);
printf("Enter the third number: ");
scanf("%f",&number3);
product=number1*number2*number3;
printf("Product = %.1f\n",product);
getchar();
getchar();
return 0;
}
Comments
Leave a comment