Advertisement
RusSimona

Varianta79 Sub3 Ex4

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