Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin ("bac.txt");
- int main ()
- {
- int maxim=-1,x
- while(fin>>x)
- {
- if(x>=maxim)
- {
- cout<<x<<" ";
- maxim=x;
- }
- }
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement