Advertisement
strg_guy

Untitled

Jun 20th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void func(char max)
  5. {
  6.     char i;
  7.     if (cin >> i)
  8.     {
  9.         if (i > max)
  10.             max = i;
  11.         func(max);
  12.     }
  13.     else
  14.         cout << max << endl;
  15. }
  16.  
  17. int main()
  18. {
  19.     func(0);
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement