Answer to Question #262668 in C++ for Rille

Question #262668

Make a program that will input type of network provider. A – for Smart and Display “SMART


USER”. B- for Globe Display “GLOBE USER” and C-for Sun Display “SUN USER”. Your program


will be terminated when you input Z.

1
Expert's answer
2021-11-08T07:52:40-0500
#include<iostream>
using namespace std;

int main(){

char input;
cout<<"Enter the input type of network provider:"<<endl;
cin>>input;
cout<<"Entered input is:"<<input<<endl;
switch(toupper(input)){
case 'A':
    cout<<"SMART USER"<<endl;
    break;
case 'B':
    cout<<"GLOBAL USER"<<endl;
    break;
case 'C':
    cout<<"SUN USER"<<endl;
    break;
case 'Z':
    break;
default:
    cout<<"Entered input was invalid"<<endl;

}
return 0;
}

Output:


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS