September 2021 0 6 Report
Сделайте блок-схему Дан целочисленный массив А[N], целое положительное число k < N, целое число m. Вставить число m перед k-ым по порядку элементом масси- ва А.

int main(int argc, char *argv[])
{
setlocale(LC_ALL, "Russian");const int N=10;
int A[N] = {0,1,2,3,4,5,6,7,8,9};
int m, k;
cout « "введите число (m) и (k):" « endl;
cin » m » k;
for (int i = N-1; i > k; i--)
a[i] = a[i - 1];
a[k] = m;
cout « "полученный массив:" « endl;
for (int i = 0; i < N; i++)
cout « a[i] « '';


system("pause");
return 0;
}
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.