SHARE
TWEET

nush

a guest Feb 27th, 2020 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top