subject

Write a program that achieves the same result as the following but uses a C++ switch statement instead. #include
int main()

{
int iNum= 0;
char cLetter= ' ';

std::cout << "Please enter a letter: ";
std::cin >> cLetter < 'c')

if ( cLetter > 'a' && cLetter < 'c')
iNum= 1;

else if ( cLetter== 'd' || cLetter == 'e' || cLetter== 'f')
iNum= 2;
else if (!(cLetter== 'b') && !(cLetter == 'g' && cLetter== 'c')
iNum=3;
else
iNum=4;

std::cout << iNum << std::endl;
system("Pause");
return 0;

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:00
Which of the following is a true statement about milestones
Answers: 1
question
Computers and Technology, 22.06.2019 01:30
What “old fashioned” features of checking accounts is p2p replacing
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
Select all that apply. which of the following are proofreading options included in microsoft word? spell check find replace grammar check formatting check
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
How many points do i need before i can send a chat
Answers: 1
You know the right answer?
Write a program that achieves the same result as the following but uses a C++ switch statement inste...
Questions
question
Mathematics, 03.12.2020 02:50
question
Mathematics, 03.12.2020 02:50
question
Mathematics, 03.12.2020 02:50
question
Mathematics, 03.12.2020 02:50
question
Mathematics, 03.12.2020 02:50