Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int i=0,a,b=0,m=0;
- cin>>a;
- while (a!=0){
- if (a>m){
- m=a;
- }
- cin>>a;
- if (m<a){
- b=m;
- }
- }
- cout <<b;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement