Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int a,b,x;
  4. int main()
  5. {
  6. cin>>a>>b;
  7.  
  8. if((a>b)&&(x=a-b)) cout<<"Primul copil este mai mare cu "<<x<< " ani ";
  9.  
  10. if((a<b)&&(x=b-a)) cout<<" Al doilea copil este mai mare cu "<<x<<" ani ";
  11.  
  12. if((a==b)&& (x==0)) cout<<"Copiii au varste egale";
  13.  
  14.  
  15. return 0;
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement