srand(time(0));
const int size = 5;
int A[size]{};
cout << "Massive A:" << endl;
for (int i = 0; i < size; i++) {
}
cout << endl;
int tmp = A[size - 1];
for (int i = size-1; i >0; i--) {
}
A[0] = tmp;
cout << "Massive A:" << endl;
for (int i = 0; i < size; i++) {
}
cout << endl;
system("pause");
const int size = 5;
int A[size]{};
cout << "Massive A:" << endl;
for (int i = 0; i < size; i++) {
A[i] = rand() % 200 - 99;
cout << A[i] << "\t";
}
cout << endl;
int tmp = A[size - 1];
for (int i = size-1; i >0; i--) {
A[i] = A[i - 1];
}
A[0] = tmp;
cout << "Massive A:" << endl;
for (int i = 0; i < size; i++) {
cout << A[i] << "\t";
}
cout << endl;
system("pause");
Комментариев нет:
Отправить комментарий