Assuming the user enters 6 in response to the question, what will the following program display on the screen?
#include <iostream>
using namespace std;
#define GREETING1 "This program calculates the number "
#define GREETING2 "of candy pieces sold."
#define QUESTION "How many jars of candy have you sold? "
#define RESULTS "The number of pieces sold: "
#define YOUR_COMMISSION "Candy pieces you get for commission: "
#define COMMISSION_RATE .20
int main()
{
const int PIECES_PER_JAR = 1860;
int jars, pieces;
double commission;
cout << GREETING1;
cout << GREETING2 << endl;
cout << QUESTION;
cin >> jars;
pieces = jars * PIECES_PER_JAR;
cout << RESULTS << pieces << endl;
commission = pieces * COMMISSION_RATE;
cout << YOUR_COMMISSION << commission << endl;
return 0;
}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.