67 069
Assignments Done
99,3%
Successfully Done
In November 2018

Answer to Question #6656 in C++ for Anurag Saini

Question #6656
Assuming that there are 7.481 gallons in a cubic foot, write a program thatthat asks the user to enter the number of gallons, and then display the equivalent in cubic feet. program in c
Expert's answer
#include <stdio.h>
#include <stdlib.h>

int main()
{
& const double galon_in_foot=7.481; // galons per cubic foot
& float input_galons=0.0; & //entered amount in galons
& float output_foot=0.0; //outputing amount in cubic feet
& printf("Enter the amount in galons\n"); //request for input
& scanf("%f", &input_galons); //inputting
& output_foot=input_galons/galon_in_foot; //calculating
& printf("The entered amount is %f in cubic feet\n", output_f oot); //output
& system("PAUSE");
& return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions