18. Make a program that will input type of network provider. A – for Smart and Display “SMART USER, enjoy 8.00 pesos per minute call”. B- for Globe Display “GLOBE USER, enjoy 8.50 per minute call” and C-for Sun Display “SUN USER, enjoy 8.75 per minute call”. Your program will be terminated when you input Z.
#include <iostream>
using namespace std;
int main ( ) {
while ( true ) {
char c;
cout << "Your choise: ";
cin >> c;
switch ( c ) {
case 'A':
cout << "SMART USER, enjoy 8.00 pesos per minute call" << endl;
break;
case 'B':
cout << "GLOBE USER, enjoy 8.50 per minute call" << endl;
break;
case 'C':
cout << "SUN USER, enjoy 8.75 per minute call" << endl;
break;
case 'Z':
cout << "Program terminated" << endl;
return 0;
default:
cout << "Invalid choise.." << endl;
}
}
return 0;
}
Comments
Leave a comment