Ask Question
31 May, 17:54

One metric ton is approximately 2,205 pounds.

Write a program that prompts the user to input the amount of wheat, in pounds, a container can hold. The program outputs the number of containers needed to store one metric ton of wheat.

+3
Answers (1)
  1. 31 May, 18:18
    0
    Here is the C+ + program

    #include

    using namespace std;

    int main () {

    double tonne = 2205;

    double container_capacity;

    cout << "Enter amount of wheat in pounds that a contained can hold: ";

    cin >> container_capacity;

    cout << "Number of containers needed to store one metric ton of wheat: " << tonne / container_capacity; }

    Explanation:

    In the body of main function, the first statement declares a double type variable tonne and assigns it a value of 2205 as it is given in the question that one metric ton is equal to 2205 pounds approx. Metric ton is also called tonne that's why i used tonne variable name in the program. Next statement declares the variable container_capacity which stores the amount of wheat a container can hold. Next the program prompts the user to enter amount of wheat that a container can hold. Next statement stores that input value (amount of wheat that container can hold). Last statement calculates and outputs the no. of containers required to store a tonne of wheat. The formula divides the value of one tonne i. e. 2205 by the capacity of the container to get no. of containers required to store one tonne of wheat. Suppose the container_capacity = 500 So number of containers needed to store one metric ton of wheat is

    tonne / container_capacity = 2205/500 = 4.41
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “One metric ton is approximately 2,205 pounds. Write a program that prompts the user to input the amount of wheat, in pounds, a container ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers