Advertisement
RusSimona

Varianta67 Sub3 Ex4

Feb 17th, 2019
106
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("date.in");
  5. int main()
  6. {
  7. int Nant,n,m;
  8. fin>>m;
  9. fin>>Nant;
  10. while(fin>>n)
  11. {
  12. if(Nant!=n) cout<<Nant<<" ";
  13. Nant=n;
  14. }
  15.  
  16. cout<<n<<" ";
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement