Czesci,
Nie moge rozwiazac zadania, polega on na wykorzystaniu array: int arr[10] i tak od 1 do 9: arr[1]...arr[9].
Przykladowy Input to
4
1 4 3 2
i Output
2 3 4 1
Zadania nie rozumiem, nie wiem jak uzyc tej metody w praktyce i prosze was o pokazanie drogi ,
moj kod:
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int a,b,c,d;
int main() {
cout <<"";
cin<<a<<b<<c<<d;
int arr[10] (" arr[0]"," arr[1]"," arr[2]"," arr[3]"," arr[4]",)
cout<<"1"<<"2"<<"3"<<"4"<<;
return 0;
}
Link do strony: https://www.hackerrank.com/challenges/arrays-introduction/problem