MasterGun

Untitled

Mar 28th, 2020
103
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. class book
  6. class rectangle
  7. class Converter {
  8.     double usd;
  9.     double eur;
  10.     double rub;
  11.     double resultusd;
  12.     double resulteur;
  13.     double resultrub;
  14. public:
  15.     Converter(double _usd, double _eur, double _rub) {
  16.  
  17.         usd = _usd;
  18.         eur = _eur;
  19.         rub = _rub;
  20.  
  21.     }
  22.     void Convert(double money){
  23.  
  24.         double resultusd = money * usd;
  25.         double resulteur = money * eur;
  26.         double resultrub = money * rub;
  27.         cout << resultusd << endl;
  28.         cout << resulteur << endl;
  29.         cout << resultrub << endl;
  30.  
  31. }
  32.  
  33.  
  34. };
  35. int main(){
  36.    
  37.    
  38.     double a;
  39.     cin >> a;
  40.     double b;
  41.     cin >> b;
  42.     double c;
  43.     cin >> c;
  44.     double d;
  45.     cin >> d;
  46.     Converter c1(a, b, c);
  47.     c1.Convert(d);
  48. return 0;
  49.  
  50. }
RAW Paste Data