0
I am not able to understand/write code properly in code coach
Just give me some tips to solve or how to solve a problem in code coach I don't want to rely on solution and learn
3 odpowiedzi
+ 1
In the while loop task, you could use an if statement and output on the condition when the index%3==0. I did it a simpler way by changing the initial value from 0 to 3, then changing the increment from 1 to 3.
In the do-while task (discounts) I used a while instead. You can test the result of cin as a boolean value condition to the while statement.
while (cin >> totalPrice)
It will be true as long as there is input, and false if there is no input.
The next line output the simple math calculation of 15 percent.
+ 1
Which Code Coach problem do you need help with?
0
Brian with the while loop code coach and do……while