Advertisement
Teodora2310

Subiect 2019, s III,3

Nov 11th, 2019
141
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. #include <fstream>
  3. using namespace std;
  4. ifstream fin ("bac.txt");
  5. int main ()
  6. {
  7. int maxim=-1,x
  8. while(fin>>x)
  9. {
  10. if(x>=maxim)
  11. {
  12. cout<<x<<" ";
  13. maxim=x;
  14. }
  15. }
  16. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement