Flowcharts of each Programming Task. a. vowelsconsonants b. guessing game c. password #include #include #include #include using namespace std; string response1, response2, response3, response4; int response; (next to this is void vowelsconsonants() then void startingup() the code is in the picture) void guessinggame() {     start:     startingup();     const int size= 4;     srand(time(0));     string pool [size] = {"Motherboard", "CPU", "Monitor", "Graphics Card"};     for (int i = 0; i < size; i++)     {         int word = rand ()% size;             string change = pool[i];         pool[i] = pool[word];         pool[word] = change;     }     for (int i=0; i<1; i++)     {           if (pool[i] == "motherboard" || pool[i] == "Motherboard" || pool[i] == "MOTHERBOARD" || pool[i] == "MotherBoard")         {               cout << "\nGuess: It's a printed circuit board that's built inside a computer's casing." <> response1;                          if (response1 == "motherboard" || response2 == "Motherboard" || response3 == "MOTHERBOARD" || response4 == "MotherBoard")             {                   cout << "\nThe answer is CORRECT!" << endl;                                  }               else              {                   cout << "\nThe answer is INCORRECT!"<< endl;                 cout << "TRY AGAIN! (PRESS 1)";                 cout << ">>>> ";                 cin >> response;                 if (response == 1)                 {                     goto start;                       system ("cls");                   }                    else                  break;                  }         }               else if (pool[i] == "cpu" || pool[i] == "CPU" || pool[i] == "Cpu")         {               cout<< "Guess: The term BRAIN is often used to describe this part of a computer. " << endl;               cout << "The Answer is: ";               cin >> response2;               if (response2 == "cpu" || response2== "CPU" || response2 == "Cpu")             {                   cout << "\nThe answer is CORRECT!" << endl;               }             else              {                   cout << "\nThe answer is INCORRECT!"<< endl;                 cout << "TRY AGAIN! (PRESS 1)";                 cin >> response;                   if (response == 1)                 {                       system ("cls");                       goto start;                   }                 else                 break;                 }         }           else if (pool[i] == "monitor" || pool[i]== "Monitor" || pool[i] == "MONITOR")         {               cout<< "Guess: It is used to show images, text, video, and graphics data generated by a computer that is linked to it." << endl;               cout << "The Answer is: ";               cin >> response3;               if (response3 == "monitor" || response3 == "Monitor" || response3 == "MONITOR")             {                   cout << "\nThe answer is CORRECT!" << endl;               }               else             {                   cout << "\nThe answer is INCORRECT!"<< endl;                 cout << "TRY AGAIN! (PRESS 1)";                 cin >> response;                   if (response == 1)                 {                       system ("cls");                       goto start;                   }                 else                 break;                  }         }         else if (pool[i] == "graphics card" || pool[i] == "graphicscard" || pool[i] == "Graphics Card" || pool[i] == "GraphicsCard" || pool[i] == "GRAPHICS CARD" || pool[i] == "GRAPHICSCARD")         {             cout << "Guess: It is an extension card that generates an image feed for a display device." << endl;             cout << "The Answer is: ";             cin >> response4;             if (response4 == "graphics card" || response4 == "graphicscard" || response4 == "Graphics Card" || response4 == "GraphicsCard" || response4 == "GRAPHICS CARD" || response4 == "GRAPHICSCARD")             {                 cout << "\nThe answer is CORRECT!" << endl;             }             else             {                 cout << "\nThe answer is INCORRECT!" << endl;                 cout << "TRY AGAIN! (PRESS 1)";                 cin >> response;                   if (response == 1)                 {                       system ("cls");                       goto start;                   }                 else                 break;             }         }     } } (next is the 2nd picture the int main)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Flowcharts of each Programming Task. a. vowelsconsonants b. guessing game c. password

#include <iostream>
#include <cstring>
#include <ctime>
#include <cstdlib>

using namespace std;

string response1, response2, response3, response4;
int response;

(next to this is void vowelsconsonants() then void startingup() the code is in the picture)

void guessinggame()
{
    start:
    startingup();
    const int size= 4;
    srand(time(0));
    string pool [size] = {"Motherboard", "CPU", "Monitor", "Graphics Card"};
    for (int i = 0; i < size; i++)
    {
        int word = rand ()% size;    
        string change = pool[i];
        pool[i] = pool[word];
        pool[word] = change;
    }
    for (int i=0; i<1; i++)
    {
          if (pool[i] == "motherboard" || pool[i] == "Motherboard" || pool[i] == "MOTHERBOARD" || pool[i] == "MotherBoard")
        {
              cout << "\nGuess: It's a printed circuit board that's built inside a computer's casing." <<endl;
              cout << "\nThe Answer is: ";
              cin >> response1;
          
              if (response1 == "motherboard" || response2 == "Motherboard" || response3 == "MOTHERBOARD" || response4 == "MotherBoard")
            {
                  cout << "\nThe answer is CORRECT!" << endl;
                  
              }
              else 
            {
                  cout << "\nThe answer is INCORRECT!"<< endl;
                cout << "TRY AGAIN! (PRESS 1)";
                cout << ">>>> ";
                cin >> response;
                if (response == 1)
                {
                    goto start;
                      system ("cls");

                  }
                   else
                 break;     
            }
        }    
          else if (pool[i] == "cpu" || pool[i] == "CPU" || pool[i] == "Cpu")
        {
              cout<< "Guess: The term BRAIN is often used to describe this part of a computer. " << endl;
              cout << "The Answer is: ";
              cin >> response2;
              if (response2 == "cpu" || response2== "CPU" || response2 == "Cpu")
            {
                  cout << "\nThe answer is CORRECT!" << endl;
              }
            else 
            {
                  cout << "\nThe answer is INCORRECT!"<< endl;
                cout << "TRY AGAIN! (PRESS 1)";
                cin >> response;
                  if (response == 1)
                {
                      system ("cls");
                      goto start;
                  }
                else
                break;    
            }
        }
          else if (pool[i] == "monitor" || pool[i]== "Monitor" || pool[i] == "MONITOR")
        {
              cout<< "Guess: It is used to show images, text, video, and graphics data generated by a computer that is linked to it." << endl;
              cout << "The Answer is: ";
              cin >> response3;
              if (response3 == "monitor" || response3 == "Monitor" || response3 == "MONITOR")
            {
                  cout << "\nThe answer is CORRECT!" << endl;
              }
              else
            {
                  cout << "\nThe answer is INCORRECT!"<< endl;
                cout << "TRY AGAIN! (PRESS 1)";
                cin >> response;
                  if (response == 1)
                {
                      system ("cls");
                      goto start;
                  }
                else
                break;     
            }
        }
        else if (pool[i] == "graphics card" || pool[i] == "graphicscard" || pool[i] == "Graphics Card" || pool[i] == "GraphicsCard" || pool[i] == "GRAPHICS CARD" || pool[i] == "GRAPHICSCARD")
        {
            cout << "Guess: It is an extension card that generates an image feed for a display device." << endl;
            cout << "The Answer is: ";
            cin >> response4;
            if (response4 == "graphics card" || response4 == "graphicscard" || response4 == "Graphics Card" || response4 == "GraphicsCard" || response4 == "GRAPHICS CARD" || response4 == "GRAPHICSCARD")
            {
                cout << "\nThe answer is CORRECT!" << endl;
            }
            else
            {
                cout << "\nThe answer is INCORRECT!" << endl;
                cout << "TRY AGAIN! (PRESS 1)";
                cin >> response;
                  if (response == 1)
                {
                      system ("cls");
                      goto start;
                  }
                else
                break;

            }
        }
    }
}

(next is the 2nd picture the int main)

161 void startingup();
162
163 int main()
164 {
165
char response;
166
string PASSone;
167
string PASStwo = "UNCea2022!";
168
start:
169
170
171
cout << "\nEnter a password to proceed."<< endl;
cout << "\nPassword: ";
172
173
cin >> PASSone;
174
175
if (PASSone == PASStwo)
176
{
177
178
system("cls");
vowelsconsonants ();
guessinggame ();
179
180
181
}
182
else
183
{
."
184
cout << "\n========
185
186
cout << "\nPASSWORD IS INCORRECT!! " << endl;
cout << "\nTRY AGAIN (PRESS ANY KEY) " ;
cin >> response;
187
188
if (response)
189
{
190
system ("cls");
goto start;
191
192
}
193
else
"1
194
cout <<
3
195
196
197 }
198
□
-0
return 0;
<< endl;
Transcribed Image Text:161 void startingup(); 162 163 int main() 164 { 165 char response; 166 string PASSone; 167 string PASStwo = "UNCea2022!"; 168 start: 169 170 171 cout << "\nEnter a password to proceed."<< endl; cout << "\nPassword: "; 172 173 cin >> PASSone; 174 175 if (PASSone == PASStwo) 176 { 177 178 system("cls"); vowelsconsonants (); guessinggame (); 179 180 181 } 182 else 183 { ." 184 cout << "\n======== 185 186 cout << "\nPASSWORD IS INCORRECT!! " << endl; cout << "\nTRY AGAIN (PRESS ANY KEY) " ; cin >> response; 187 188 if (response) 189 { 190 system ("cls"); goto start; 191 192 } 193 else "1 194 cout << 3 195 196 197 } 198 □ -0 return 0; << endl;
#249999
11
12 {
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
void vowelsconsonants ()
char phrase [40];
int vowel = 0, cons= 0;
cout << "\nINSERT ANY PHRASE HERE (No more than 40 characters): ";
cin.ignore();
cin.getline (phrase, 40);
for (int i = 0; i < phrase[i]; i++)
{
if (phrase[i] == 'a' || phrase[i] == 'A' || phrase[i] == 'e' || phrase[i] == 'E' || phrase[i] == 'i' || phrase[i] == 'I' || phrase[i] == 'o' || phrase[i] == '0' ||
phrase[i] == 'u' || phrase[i] == 'U' )
{
vowel++;
}
else if ((phrase[i] >= 'a' && phrase[i] <= 'z' || phrase [i] >= 'A' && phrase[i] <= 'Z'))
cons++;
}
cout << "\n======
cout << "\nThe Phrase that you input is " << phrase << endl;
cout << "\nThe total amount of vowels is: " << vowel << endl;
cout << "\nThe total amount of consonants is: " << cons << endl;
}
void startingup()
cout << "\n========
========";
cout << "\nInstructions: Identify the word that describes the sentence. " << endl;
cout << "\nThe topic is the Computer's Components." << endl;
cout << "\n========
===========\n";
}
28
29
30
31
32
33
34
35
36
37 {
38
卡出卡卡卡出台
44
Transcribed Image Text:#249999 11 12 { 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 void vowelsconsonants () char phrase [40]; int vowel = 0, cons= 0; cout << "\nINSERT ANY PHRASE HERE (No more than 40 characters): "; cin.ignore(); cin.getline (phrase, 40); for (int i = 0; i < phrase[i]; i++) { if (phrase[i] == 'a' || phrase[i] == 'A' || phrase[i] == 'e' || phrase[i] == 'E' || phrase[i] == 'i' || phrase[i] == 'I' || phrase[i] == 'o' || phrase[i] == '0' || phrase[i] == 'u' || phrase[i] == 'U' ) { vowel++; } else if ((phrase[i] >= 'a' && phrase[i] <= 'z' || phrase [i] >= 'A' && phrase[i] <= 'Z')) cons++; } cout << "\n====== cout << "\nThe Phrase that you input is " << phrase << endl; cout << "\nThe total amount of vowels is: " << vowel << endl; cout << "\nThe total amount of consonants is: " << cons << endl; } void startingup() cout << "\n======== ========"; cout << "\nInstructions: Identify the word that describes the sentence. " << endl; cout << "\nThe topic is the Computer's Components." << endl; cout << "\n======== ===========\n"; } 28 29 30 31 32 33 34 35 36 37 { 38 卡出卡卡卡出台 44
Expert Solution
steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY