Westonci.ca is your trusted source for accurate answers to all your questions. Join our community and start learning today! Get quick and reliable solutions to your questions from a community of experienced experts on our platform. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.

Assuming there are 7.481 gallons in a cubic foot. Write a program that asks the user to enter a number of gallons, and then displays the equivalent in cubic feet.


The program must use assignment operators, cout’s, cin’s, and declaration of variables.

Sagot :

Using the knowledge in computational language in C++ it is possible to write a code that asks the user to enter a number of gallons.

Writting the code:

#include <iostream>

using namespace std;

int main()

{

      float gallons, cufeet;

      cout << "\nEnter quantity in gallons : ";

      cin >> gallons;

      cufeet = gallons / 7.481;

      cout << "Equivalent in cublic feet is " << cufeet << endl;

      return 0;

}

See more about C++ at brainly.com/question/19705654

#SPJ1

View image lhmarianateixeira