Advertisement
SelinD

v89s3ex4

Mar 26th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3. using namespace std;
  4. ifstream fin("bac.txt.cpp");
  5. int ap[1000];
  6. int main()
  7. {
  8. int k,x,i;
  9. while(fin>>x)
  10. {
  11. ap[x]=1;
  12. }
  13. cin>>k;
  14. for(i=100; i>=k; i--)
  15. {
  16. if(ap[i]>=1) cout<<i<<" ";
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement