Answer to Question #216278 in C++ for kaydee

Question #216278
A fruit packing company needs to divide a freight of oranges in different quantities according to the size of boxes that must be packed. For example, for South America boxes must contain 36 oranges; for Europe boxes must contain 24 oranges. You are required to write a program to determine the number of boxes as well as the number of oranges left after packing. There are 1256 oranges in the load. The program has the following structure: Declare three int variables nrOranges, nrBoxes, and nrLeft. nrOranges represents the number of oranges in the load, nrBoxes represents the number of boxes packed, and nrLeft represents the number of oranges that is left. Assign the value 1256 to nrOranges.
Write the statement to calculate the number of boxes of size boxSize. Write the statement to calculate the number of oranges, if any are left.
1
Expert's answer
2021-07-12T17:18:23-0400
#include <iostream>


using namespace std;


int main()
{
    int nrOranges,nrBoxes,nrLeft;
    nrOranges=1256;
    int n1,n2;
    int nR=(n1*24)+(n2*36);
    nrLeft=nrOranges-nR;
    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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS