Question: 6 . 1 Write a for - statement to display the numbers 1 through 1 0 on the screen. 6 . 2 Write a while
Write a forstatement to display the numbers through on the screen.
Write a whilestatement to display the numbers through on the screen.
The code below should display the numbers and on the screen. However, the code is
not working correctly. Correct the errors in the code.
int num ;
while num
cout num endl;
endwhile
The code below should display each salesperson's commission. The commission is calculated
by multiplying the salesperson's sales by The code is not working correctly. Correct the
errors in the code.
float sales ;
float commission ;
cout "Enter a sales amount: ;
cin sales;
while sales
Commission sales ;
cout commission endl;
endwhile
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
