Ask Question
6 May, 11:28

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.

+1
Answers (1)
  1. 6 May, 14:12
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers