Advertisement
askarulytarlan

Задача F. Максимум из трех

Oct 8th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4. #include <math.h>
  5.  
  6.  
  7. using namespace std;
  8.  
  9. int a, b, c;
  10.  
  11. int main(int argc, const char * argv[]) {
  12.  
  13. cin >> a >> b >> c;
  14. if (a >= c ) {
  15. if (a >= b) {
  16. cout << a;
  17. }
  18. else {
  19. cout << b;
  20. }
  21. }
  22. else if (c >= b){
  23. cout << c;
  24. }
  25. else {
  26. cout << b;
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement