srand(time(0));
const int size = 20;
int A[size]{};
for (size_t i = 0; i < size; i++)
{
cout << endl;
int digit;
int index = 0;
cout << "Enter digit:";
cin >> digit;
cout << endl;
for (size_t i = 0; i < size; i++)
{
if (index)
const int size = 20;
int A[size]{};
for (size_t i = 0; i < size; i++)
{
A[i] = rand() % 101;}
cout << A[i] << "\t";
cout << endl;
int digit;
int index = 0;
cout << "Enter digit:";
cin >> digit;
cout << endl;
for (size_t i = 0; i < size; i++)
{
if (A[i] == digit)}
index++;
if (index)
cout << index << " times the number found" << endl;else
cout << "Digit not found in massive" << endl;system("pause");
Комментариев нет:
Отправить комментарий