fork(5) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. long int tab[1000];
  6. int i,ile;
  7. char c;
  8. long int x;
  9. int main()
  10. {
  11. cin>>ile;
  12. for (i=1;i<=ile;i++)
  13. cin>>tab[i];
  14. cin>>c>>x;
  15. if (c=='>')
  16. for (i=0; i<=ile;i++)
  17. if (tab[i]>x) cout<<tab[i]<<endl;
  18. if (c=='<')
  19. for (i=0; i<=ile;i++)
  20. if (tab[i]<x) cout<<tab[i]<<endl;
  21. return 0;
  22. }
Success #stdin #stdout 0s 4532KB
stdin
5
2
7
0
6
2
> 4
stdout
7
6