#include <iostream>
using namespace std;
int main()
{
int a[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
for (int i = 0; i < 10; i++)
{
if (a[i] > 5) cout << "mistake" << endl;
return 0;
a[i] = a[i] + 1;
}
for (int j = 0; j < 10; j++)
{
cout << a[j] << " ";
}
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int a[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
for (int i = 0; i < 10; i++)
{
if (a[i] > 5) cout << "mistake" << endl;
break;
a[i] = a[i] + 1;
}
for (int j = 0; j < 10; j++)
{
cout << a[j] << " ";
}
return 0;
}