Advertisement
Rainrix2001

Prob3

Aug 22nd, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.83 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main (){
  5.     string num;
  6.     float amount;
  7.     char response = 'Y';
  8.     while (response=='y' || response=='Y') {
  9.     system("clear");
  10.     cout << "Loading Station \n";
  11.     cout << "--------------------------- \n";
  12.     cout << "Mobile Number: ";
  13.     cin >> num;
  14.     cout << "Enter Amount: ";
  15.     cin >> amount;
  16.     cout << "--------------------------- \n";
  17.     cout << amount << ".00" << " Successfully Loaded on " << num << ". \n";
  18.     cout << "--------------------------- \n";
  19.    
  20.     cout << "Load Again [Y/N]: ";
  21.     cin >> response;
  22. }
  23.    
  24.     if (response=='N' || response=='n') {
  25.         system("clear");
  26.         cout << "Loading Station \n";
  27.         cout << "--------------------------- \n";
  28.         cout << "Transaction Terminated! \n\n";
  29.         cout << "--------------------------- \n";
  30.         cout << "Thank you! Load pa more... \n\n";
  31.    
  32.     }
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement