SelinD

v79s2ex3

Mar 4th, 2019
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include<iostream>
  2. #include<cmath>
  3. using namespace std;
  4.  
  5. void maxi(double a,double b,double &maxim)
  6. {
  7. double x,y;
  8. x=(int)a/100.0+(int)(a*100)%100;
  9. y=(int)b/100.0+(int)(b*100)%100;
  10. maxim=a;
  11. if(maxim<b) maxim=b;
  12. if(maxim<x) maxim=x;
  13. if(maxim<y) maxim=y;
  14. }
  15. int main()
  16. {
  17. double n;
  18. maxi(33.17,15.40,n);
  19. cout<<n;
  20. }
Add Comment
Please, Sign In to add comment