Question: 6 . 1 Write a for - statement to display the numbers 1 through 1 0 on the screen. 6 . 2 Write a while

6.1 Write a for-statement to display the numbers 1 through 10 on the screen.
6.2 Write a while-statement to display the numbers 1 through 10 on the screen.
6.3 The code below should display the numbers 1,2,3 and 4 on the screen. However, the code is
not working correctly. Correct the errors in the code.
int num =1;
while (num 4)
cout num endl;
// endwhile
6.4 The code below should display each salesperson's commission. The commission is calculated
by multiplying the salesperson's sales by 10%. The code is not working correctly. Correct the
errors in the code.
float sales =0.0;
float commission =0.0;
cout "Enter a sales amount: ";
cin > sales;
while (sales >0.0
{
Commission = sales ***0.1;
cout commission endl;
}
// endwhile
 6.1 Write a for-statement to display the numbers 1 through 10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!