Write a C program which reads values for two floats and outputs their sum, product, and quotient. Include a sensible input prompt and informative output.
1
Expert's answer
2021-10-08T04:35:04-0400
#include <stdio.h>
int main() {
printf("Enter 2 numbers: ");
float a, b;
scanf("%f %f", &a, &b);
printf("Sum: %f\n", a + b);
printf("Product: %f\n", a * b);
printf("Quotient: %f\n", a / b);
return 0;
}
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment