Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

=+you think is being taxed when more money is printed? Why?

Answered: 1 week ago