Advertisement
Guest User

kl

a guest
Feb 29th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int i=0,a,b=0,m=0;
  6. cin>>a;
  7. while (a!=0){
  8. if (a>m){
  9. m=a;
  10. }
  11. cin>>a;
  12. if (m<a){
  13. b=m;
  14. }
  15. }
  16. cout <<b;
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement