Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- int n, k;
- scanf("%d%d", &n, &k);
- int niza[n];
- for(int i = 0; i < n; i++) {
- scanf("%d", &niza[i]);
- }
- int a[n];
- int indeks = 0;
- for(int i = k; i < n; i++) {
- a[indeks] = niza[i];
- indeks++;
- }
- for(int i = 0; i < k; i++) {
- a[indeks] = niza[i];
- indeks++;
- }
- for(int i = 0; i < n; i++) {
- printf("%d ", a[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement