hopingsteam

Untitled

May 22nd, 2020
124
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. ifstream fin("fisier.in");
  7.  
  8. int main()
  9. {
  10. int a, b, c, d;
  11. bool flag = false;
  12. fin >> a >> b >> c;
  13. while(fin >> d)
  14. {
  15. if(flag == false && a < b && b < c && c < d)
  16. {
  17. cout << a << " " << b << " " << c << " " << d;
  18. flag = true;
  19. }
  20. a = b;
  21. b = c;
  22. c = d;
  23. }
  24. if(flag == false)
  25. cout << "NU EXISTA";
  26. return 0;
  27. }
RAW Paste Data