Answer to Question #263183 in C++ for fiona

Question #263183

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-09T04:29:36-0500


#include <iostream>
#include <string>
using namespace std;


void main(){
	char typeNetworkProvider=' ';
	while(typeNetworkProvider!='Z'){
		cout<<"Input type of network provider (A,B,C, Z-exit): ";
		cin>>typeNetworkProvider;
		if(typeNetworkProvider=='A'){
			cout<<"SMART USER\n\n";
		}else if(typeNetworkProvider=='B'){
			cout<<"GLOBE USER\n\n";
		}else if(typeNetworkProvider=='C'){
			cout<<"SUN USER\n\n";
		}else if(typeNetworkProvider=='Z'){
			//exit
		}else{
			cout<<"Wrong type of network provider.\n\n";
		}
	}
}

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