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, 22.06.2019 18:00
When is it appropriate to use an absolute reference
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
The blank button automatically displays next to the data when you select a range of numeric data which is an available option for creating a chart
Answers: 3
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
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
Chemistry, 10.01.2021 01:10
question
English, 10.01.2021 01:10
question
Social Studies, 10.01.2021 01:10
question
Mathematics, 10.01.2021 01:10
question
Health, 10.01.2021 01:20
Questions on the website: 13722361