Advertisement
Guest User

nush

a guest
Feb 27th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int n,i,y,v[100],x,c;
  9. ifstream f("date.in");
  10. ofstream g("date.out");
  11. f>>n;
  12. f>>x>>y;
  13. for (i=1;i<=n;i++)
  14. f>>v[i];
  15. for (i=n;i>=y+1;i--)
  16. v[y+1]=v[x];
  17. for (i=1;i<=n;i++)
  18. g<<v[i]<<' ';
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement