pastebin

Paste Search Dynamic
Recent pastes
Bank
  1. #include<iostream>
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4.  
  5. class Bank
  6. {
  7. public :
  8.     string Name;
  9.     int Account;
  10.     void in()
  11.     {
  12.         cin >> Name >> Account >> Balance;
  13.         cout << endl;
  14.     }
  15.     void out()
  16.     {
  17.         cout << "Name :" << Name << "n" << "Account :" << Account << "n" << "Balance with interest :" << Balance << "n";
  18.     }
  19.     void interest()
  20.     {
  21.         Balance += (Balance*10)/100;
  22.     }
  23. private :
  24.     int Balance;
  25. };
  26.  
  27. int main()
  28. {
  29.     Bank Obj;
  30.     Obj.in();
  31.     Obj.interest();
  32.     Obj.out();
  33. }
Parsed in 0.005 seconds