Question
In the PDF file that will contain your screen shots, write the statements that corresponds to what is done and also write it using combined
In the PDF file that will contain your screen shots, write the statements that corresponds to what is done and also write it using combined assignment operators to perform the following (A and 'B' are shown as examples):
| Statement: | Combined: |
A) Add 6 to x. | x = x + 6 | x += 6 |
B) Subtract 4 from amount. | amount = amount 4 | amount -=4 |
C) Multiply y by 4. |
|
|
D) Divide total by 27. |
|
|
E) Store in x the remainder of x divided by 7. |
|
|
F) Add y * 5 to x. |
|
|
G) Subtract discount times 4 from total. |
|
|
H) Multiply increase by salesRep times 5. |
|
|
I) Divide profit by shares minus 1000. |
|
|
We cannot use an if/else statement. Has to be decimal formatting which is explained by ...
Assume the variable total has the dollar amount stored in it and you want to print that to the screen, you will need to have:
cout<<"The total amount is "<
The combination of "fixed<
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started