subject

C++: In this lab the completed program should print the numbers 0 through 10, along with their values multiplied by 2 and by 10. You should accomplish this using a for loop instead of a counter-controlled while loop. Instructions: Write a for loop that uses the loop control variable to take on the values 0 through 10.
In the body of the loop, multiply the value of the loop control variable by 2 and by 10.
previous code to work from:
#include
#include
using namespace std;

int main()
{

string head1 = "Number: ";
string head2 = "Multiplied by 2: ";
string head3 = "Multiplied by 10: ";
int numberCounter; // Numbers 0 through 10
int byTen; // Stores the number multiplied by 10
int byTwo; // Stores the number multiplied by 2
const int NUM_LOOPS = 10; // Constant used to control loop

// This is the work done in the housekeeping() function
cout << "0 through 10 multiplied by 2 and by 10." << endl;

// This is the work done in the detailLoop() function
// Write your for loop here.
for (numberCounter = 0 to NUM_LOOPS
// This is the work done in the endOfJob() function
return 0;
} // End of main()

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:20
The pyraminx is a rubik's cube-type toy in the shape of a tetrahedron (not a pyramid). the pyraminx shown below has edges 15\,\text{cm}15cm15, space, c, m long and vertical height h=12.2\,\text{cm}h=12.2cmh, equals, 12, point, 2, space, c, m. the triangle drawn with dashed lines is a right triangle. what is the distance rrr? round your answer to the nearest tenth.
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
question
Computers and Technology, 23.06.2019 21:10
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
You know the right answer?
C++: In this lab the completed program should print the numbers 0 through 10, along with their value...
Questions
Questions on the website: 13722359