Answer to Question #264395 in C++ for Kashce

Question #264395

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.

1
Expert's answer
2021-11-12T07:21:49-0500
#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;
}

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