Rainrix2001

Prob 4

Aug 27th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.38 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5. string asd;
  6. system ("cls");
  7. cout << "Detect Mobile Network\n";
  8. cout << "--------------------------\n";
  9. cout << "Mobile Number: ";
  10. cin >> asd;
  11. asd[3];
  12. cout << "\n--------------------------\n";
  13.  
  14.     if (asd[3] == '3' || asd[3] == '4') {
  15.         cout << "This Number Belongs to:\nSmart Telecom";
  16.         cout << "\n--------------------------\n";
  17.  
  18.     } else if (asd[3] == '5') {
  19.     cout << "This Number Belongs to:\nSmart Telecom";
  20.     cout << "\n--------------------------\n";
  21.  
  22.     } else if (asd[3] == '7' || asd[3] == '8') {
  23.     cout << "This Number Belongs to:\nGlobe Telecom";
  24.     cout << "\n--------------------------\n";
  25.  
  26.     } else if (asd[3] == '9') {
  27.     cout << "This Number Belongs to:\nGlobe Telecom";
  28.     cout << "\n--------------------------\n";
  29.  
  30.     } else if (asd[3] == '6' || asd[3] == '0') {
  31.     cout << "This Number Belongs to:\nSam Telecom";
  32.     cout << "\n--------------------------\n";
  33.  
  34.     } else if (asd[3] == '1') {
  35.     cout << "This Number Belongs to:\nSam Telecom";
  36.     cout << "\n--------------------------\n";
  37.  
  38.     } else if (asd[3] == '2') {
  39.     cout << "This Number Belongs to:\nReserved";
  40.     cout << "\n--------------------------\n";
  41.  
  42.     } else {
  43.     cout << "This Number Belongs to:\nInvalid Number";
  44.     cout << "\n--------------------------\n";
  45.     }
  46.  
  47. return 0;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment