Advertisement
Guest User

simpleC++

a guest
Oct 20th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int w,x,y,z;
  7.    
  8.     cout << "* Please insert 4 integer numbers \n";
  9.     cout << "1st number: ";
  10.     cin >> w;
  11.     cout << "2nd number: ";
  12.     cin >> x;
  13.     cout << "3rd number: ";
  14.     cin >> y;
  15.     cout << "4th number: ";
  16.     cin >> z;
  17.     cout << "\n";
  18.    
  19.     int geng=w*x;
  20.     geng=geng+w*x;
  21.     x=x-(y-z);
  22.     int team=geng+x;
  23.    
  24.     cout << "Your 1st answer,Geng="<< geng << endl;
  25.     cout << "Your 2nd answer,x="<< x << endl;
  26.     cout << "Your 3rd answer,Team="<< team << endl;
  27.    
  28.     cout << "\n";
  29.     cout << "You completed your mission\n";
  30.     cout << "See you for the next mission\n";
  31.     cout << "--------BYE BYE---------------";
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement