Advertisement
Dizzy3113

Untitled

Mar 30th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int v[100];
  8. float x;
  9. ifstream f("bac.in");
  10. f>>x;
  11.  
  12. for(int i=1; i<=99; i++)
  13. v[i]=0;
  14.  
  15. while(f>>x)
  16. v[int(x)]=1;
  17.  
  18. for(int i=1; i<=99; i++)
  19. if(v[i]==1)
  20. cout<<i<<" ";
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement