ode that will ask again what is asked if the input is wrong which has spaces
ode that will ask again what is asked if the input is wrong which has spaces
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
Related questions
Question
code that will ask again what is asked if the input is wrong which has spaces?
![LO
11
12
13
14
15
16
L7
18
19
20
21
22
23
24
25
26
27
28
char SP;
do{
cout << "\nAre you Student or Professor [5 for Studen while P for Professor]: ";
cin >> SP;
SP-toupper (SP); //CAPS the inputed char
cin.ignore();
}while (SP != 'S' && SP != 'P');
if (SP == 'S'){
Stud();
}
else if (SP == *P'){
| Prof();
}
cout << endl;
32
33
ROBLEMS OUTPUT DEBUG CONSOLE TERMINAL
5 C:\Users\Joshua Kevin\Downloads> cd "c:\Users\Joshua Kevin\Downloads\"; if ($?) { g++ saasaasaas.cpp -o saasaasaas };
re you Student or Professor [S for Studen while P for Professor]: k
re you Student or Professor [S for Studen while P for Professor]: a
re you Student or Professor [S for Studen while P for Professor]: 5
re you Student or Professor [S for Studen while P for Professor]: %
re you Student or Professor [5 for Studen while P for Professor]: s p
ter First Name: Enter Last Name:
int main()
{
29
30
31](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F12f44c56-6841-4785-bb64-69ff5473a17e%2F2e21f96e-0ff2-4557-8552-2ba2f7eb98a7%2F7msqmbq_processed.png&w=3840&q=75)
Transcribed Image Text:LO
11
12
13
14
15
16
L7
18
19
20
21
22
23
24
25
26
27
28
char SP;
do{
cout << "\nAre you Student or Professor [5 for Studen while P for Professor]: ";
cin >> SP;
SP-toupper (SP); //CAPS the inputed char
cin.ignore();
}while (SP != 'S' && SP != 'P');
if (SP == 'S'){
Stud();
}
else if (SP == *P'){
| Prof();
}
cout << endl;
32
33
ROBLEMS OUTPUT DEBUG CONSOLE TERMINAL
5 C:\Users\Joshua Kevin\Downloads> cd "c:\Users\Joshua Kevin\Downloads\"; if ($?) { g++ saasaasaas.cpp -o saasaasaas };
re you Student or Professor [S for Studen while P for Professor]: k
re you Student or Professor [S for Studen while P for Professor]: a
re you Student or Professor [S for Studen while P for Professor]: 5
re you Student or Professor [S for Studen while P for Professor]: %
re you Student or Professor [5 for Studen while P for Professor]: s p
ter First Name: Enter Last Name:
int main()
{
29
30
31
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage