Question

Instruction: Answer the following Using below half-cut flowchart, write a complete source code using while repetition structu

0 0
Add a comment Improve this question Transcribed image text
Answer #1

C++ Code:

#include <iostream>
using namespace std;

int main()
{
   int count=0; //initializing count to 0
  
   while(count<100)
   {
       cout << "Welcome to C++\n"; //prints the message
       count++; //increments count
   }
}

Snippet:

#include <iostream> using namespace std; int main() { int count=0; 1/initializing count to a while(count<100) { cout << Welc

Output:

prints "Welcome to C++" 100 times in 100 lines.

If you have any queries, please comment below.

Please upvote , if you like this answer.

Add a comment
Know the answer?
Add Answer to:
Instruction: Answer the following Using below half-cut flowchart, write a complete source code using while repetition...
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
  • What is the output of the following C++ code? int count = 1; int num =...

    What is the output of the following C++ code? int count = 1; int num = 25; while (count < 25) { num--; count++; } cout << count « " " « num << endl i 25 1 0 24 1 0 25 0 0 24 0 In this while loop statement, while (counter < 10), where counter is an int variable. Which statement below is an equivalent way to write this while statement? while (10 < counter) while (9...

  • *** Please construct a flowchart for the following code (this was in C++): *** #include using...

    *** Please construct a flowchart for the following code (this was in C++): *** #include using namespace std; void printPrompt(int n){    switch(n){        case 1:            cout << "Enter the quiz grades:" <            break;        case 2:            cout << "Enter the assignments grades:" <            break;        case 3:            cout << "Enter the exam grades:" <            break;        case...

  • Write this code in c++ and screen shot the code 2. Given the code below: int...

    Write this code in c++ and screen shot the code 2. Given the code below: int vals t1 (4.7,11). valPtr valPtr-vals What is the output of the following statements, if it is an address, indicate that: a. cout (1valPtr) F c. cout << (valPtr2); e. cout <<*(valPtr0) cout << "True" cout << "False" cout << "True" cout << "False" cout << "True" cout << "False", ㄱ Hip else g. if (valPtr&valPtr [1]) else h. if (valPtr (4] &valPtr [1]) else

  • How can I write this code (posted below) using vectors instead of arrays? This is the...

    How can I write this code (posted below) using vectors instead of arrays? This is the task I have and the code below is for Task 1.3: Generate twenty random permutations of the number 0, 1, 2, ..., 9 using of the algorithms you designed for Task 1.3. Store these permutations into a vector and print them to the screen with the additional information of unchanged positions and number of calls torand(). Calculate the total numbers of unchanged positions. Compare...

  • Write a c++ code into the given code  to find composite numbers from the given random number...

    Write a c++ code into the given code  to find composite numbers from the given random number list. The composite numbers is only counted once if there is a repeated number. I need to use this code and add on a code to find if the numbers generated is a composite function. Please help #include <cmath> #include <cstdlib> #include <ctime> #include <iostream> #include <vector> using namespace std; int main() {    srand(time(NULL)); int size_of_list = 0; // the number of random...

  • Topics c ++ Loops While Statement Description Write a program that will display a desired message...

    Topics c ++ Loops While Statement Description Write a program that will display a desired message the desired number of times. The program will ask the user to supply the message to be displayed. It will also ask the user to supply the number of times the message is to be displayed. It will then display that message the required number of times. Requirements Do this assignment using a While statement.    Testing For submitting, use the data in the...

  • answer in c++ Using the table below, complete the C++ code to write the function prototype...

    answer in c++ Using the table below, complete the C++ code to write the function prototype statement, and the void function header. The void function should receive three double variables: the first two by value and the last one by reference. Name the formal parameters num1, num2 and answer. The function should divide the num1 variable by the num2 variable and then store the result in the answer variable. Name the function calcQuotient. Also write an appropriate function prototype for...

  • C++ assignment. Please help me to complete this code: #include <string> #include <iostream> using namespace std;...

    C++ assignment. Please help me to complete this code: #include <string> #include <iostream> using namespace std; // Write your function here //////////////// STUDENT TESTING //////////////////// int run() { cout << "Student testing" << endl; strip(); return 0; } Here is the instruction: Write a filter function named strip that removes C++ comments from input, sending the uncommented portion of the program to output. Your program should work with both single line (//) comments, and multi-line (/* */) comments. + A...

  • C++ Please complete the implementation of the following source code (Question3.cpp). You need to add your...

    C++ Please complete the implementation of the following source code (Question3.cpp). You need to add your code in the source code where the comment “// your code” locates. After you finish the implementation, please also provide the output of your program. #include <iostream> using namespace std; class Shape { protected: // your code public: void setWidth (int w) { // your code } void setHeight (int h) { // your code } }; class Rectangle: public Shape { public: int...

  • 31. The following code segment is syntactically correct:              int number{20};          cout << number <<...

    31. The following code segment is syntactically correct:              int number{20};          cout << number << setbase(16) << " " << number                               << setbase(10) << " " << number                                 << showpos << " " << number << endl;                 T__   F__       32. The following statement wants to determine if ‘count’ is outside the     range of 0 through 100:             if (count < 0 && count > 100)                                             T__   F__ 33. There is...

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