Question

11) 16 pts. Convert the following for loop to a while loop. (You may want to do the following question first.) int mine [5] = {10, 11, 12); for (int j=1; j < 5; j++) cout <<j<< << mine[jl << << end1; 12) 6 pts. What is the output of the previous question? 13) 4 pts. Circle the variables that would NOT cause syntax errors 2-smaTT , entry# break -my-int
0 0
Add a comment Improve this question Transcribed image text
Answer #1

11.

while(j < 5)
{
cout << j << " " << mine[j] << " " << endl;
j++;
}

12. Prints the elements from index 1 to 4

1 11
2 12
3 0
4 0

13. Variables should start with numbers or should not contain special characters or should not contain keywords.

int2real
Splendid
_my_int

If you have any doubts comment below and I am happy to help :)

Add a comment
Know the answer?
Add Answer to:
11) 16 pts. Convert the following for loop to a while loop. (You may want to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 12) 8 pts. Find the errors in the following code fragment and correct them. #i nclude...

    12) 8 pts. Find the errors in the following code fragment and correct them. #i nclude <iostream> using namespace std; double fudge (double s) f return s 2.3; int mainO cout >> "Your original estimate" double estimate; cin >> estimate; cout << endl; for (int 1 = 0;1c3;i++); cout << "EStimate' < fudge(estimate) <<endl Hint: There are 4 syntax errors. There is one error that is syntactically correct but causes the output to not be what you would expect. Once...

  • Convert the following while loop into a for loop. int 1 - 50: int sum-07 while...

    Convert the following while loop into a for loop. int 1 - 50: int sum-07 while (sum < 1000) sum - sum + 1; Question 35 (2 points) Saved Given an int variable k that has already been declared, use a while loop to print a single line consisting of 80 dollar signs. Use no variables other than k. int sum = 0; for(int i = 100;sum < 10000;1-- sum = sum + i;

  • What does the following nested loop structure output? count = 1; while (count <= 11) {innerCount...

    What does the following nested loop structure output? count = 1; while (count <= 11) {innerCount = 1 while (innerCount <= (12 - count)/2) {cout << " "; innerCount++;} innerCount = 1; while (innerCount = 1; while (innerCount <= count) {cout << "0"; innerCount++;} cout << endl; count++;} What does the following nested loop structure output? count = 1; while (count <= 10) {innerCount = 1; while (innerCount <= 10) {cout << setw(5) << count * innerCount; innerCount++;} cout <<...

  • Question 1 2 pts The preprocessor executes after the compiler. False True Question 2 2 pts...

    Question 1 2 pts The preprocessor executes after the compiler. False True Question 2 2 pts What code is human-readable and follows the standards of a programming language? Secret code Source code Key code None of these Machine code Question 3 2 pts What is the symbol that marks the beginning of a one line comment? Question 1 2 pts The preprocessor executes after the compiler. True False Question 5 2 pts A statement that may be used to stop...

  • Posted this a few hours ago. Can anyone help with this? IN C++ Perform the following:...

    Posted this a few hours ago. Can anyone help with this? IN C++ Perform the following: Read 10 bowlers with 3 scores each into 1 string array and 1 numeric array(2 dimension double array) Sort the data by individual bowlers averages, Don't forget to sort their names also. Calculate the average across and store in your existing array. Calculate the average down and store in your existing array. Print out the contents of both arrays. This will print the averages...

  • Eclipse Java Oxygen Question 11 pts A compile-time error occurs when Group of answer choices c....

    Eclipse Java Oxygen Question 11 pts A compile-time error occurs when Group of answer choices c. there’s a syntax error in a Java statement a. the Java compiler can’t be located b. bytecodes can’t be interpreted properly c. there’s a syntax error in a Java statement Flag this Question Question 21 pts An error that lets the application run but produces the wrong results is known as a Group of answer choices d. syntax error c. logic error a. runtime...

  • The following individual two programs are using while loop in order to print a specific output:...

    The following individual two programs are using while loop in order to print a specific output: The outputs of the first program are: 10 9 8 5 4 The outputs of the second program are: 123456789 Using the Table 3.1 below, allocate the error(s) of each line of two programs and type of error: The first program: public Main { public static void main(String args[]){ int i=10 while(i>4){ System.out.print(i); i++; } } } The second program:   public class Main   {...

  • The following individual two programs are using while loop in order to print a specific output:...

    The following individual two programs are using while loop in order to print a specific output: The outputs of the first program are: 10 9 8 5 4 The outputs of the second program are: 123456789 Using the Table 3.1 below, allocate the error(s) of each line of two programs and type of error: The first program: public Main { public static void main(String args[]){ int i=10 while(i>4){ System.out.print(i); i++; } } } The second program:   public class Main   {...

  • Class: C++ Final Exam Dates Multiple Choice Identify the choice thar best completes the statement or...

    Class: C++ Final Exam Dates Multiple Choice Identify the choice thar best completes the statement or answer the question N 1. In s tructures, the computer repeats particular statements a certain number of times depending on some condition(s) a. looping C. selection b. branching d. sequence 2. What is the output of the following CH code? count = 1; num - 25; while (count < 25) numnum - 1: count++; cout << count << " " << num << endl;...

  • In C++ Do not use a compiler like CodeBlocks or online. Trace the code by hand....

    In C++ Do not use a compiler like CodeBlocks or online. Trace the code by hand. Do not write "#include" and do not write whole "main()" function. Write only the minimal necessary code to accomplish the required task.                                                                                                           Save your answer file with the name: "FinalA.txt" 1) (2 pts) Given this loop                                                                                              int cnt = 1;     do {     cnt += 3;     } while (cnt < 25);     cout << cnt; It runs ________ times    ...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT