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

28th Aug 2022, 11:04 AM
Shaheer Shah
Shaheer Shah - avatar
3 Respostas
+ 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.
29th Aug 2022, 9:55 AM
Brian
Brian - avatar
+ 1
Which Code Coach problem do you need help with?
29th Aug 2022, 9:37 AM
Brian
Brian - avatar
0
Brian with the while loop code coach and do……while
29th Aug 2022, 9:39 AM
Shaheer Shah
Shaheer Shah - avatar