Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- int n, i, a[100], m;
- printf("Vnesete n\n");
- fflush(stdout);
- scanf("%d", &n);
- for(i=0; i<n; i++)
- scanf("%d", &a[i]);
- scanf("%d", &m);
- int b[100];
- for(i=0; i<n; i++){
- if(i-m<0)
- b[i-m+n]=a[i];
- else
- b[i-m]=a[i];
- }
- for(i=0; i<n; i++)
- printf("%d ", b[i]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement