Advertisement
Guest User

Untitled

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