Advertisement
jelyslime

zadachi svurzani s diagrami na Ven

Jan 27th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int venOiler(int E , int G, int F, int S, int EG, int EF, int GS)
  7. {
  8.     int res;
  9.     E = E - (EG + EF);
  10.     G = G - (EG + GS);
  11.     F = F - EF;
  12.     S = S - GS;
  13.  
  14.     res = E + G + F + S + EG + EF + GS;
  15.  
  16.  
  17.     return res;
  18. }
  19.  
  20.  
  21.  
  22. int main()
  23. {
  24.     cout << "Vuvedete E,G,F,S,EG,EF,GS" << endl;
  25.     int E, G, F, S, EG, EF, GS;
  26.     cin >> E >> G >> F >> S >> EG >> EF >> GS;
  27.     cout << "E = " << E << " G = " << G << " F = " << F << " S = " << S << " EG = " << EG << " EF = " << EF << " GS = " << GS << endl;
  28.     int res = venOiler(E, G, F, S, EG, EF, GS);
  29.     cout << res << endl;
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement