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;
}
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment