Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
481 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main() 
{
    int mass[10]; 
    for (int i = 0; i < 10; i++) 
    {
        cin >> mass[i];
    }
    int zeroIndex = -1; 
    for (int i = 0; i < 10; i++) 
    {
        if (mass[i] == 0) 
        {
            zeroIndex = i;
            break;
        }
    }
    if (zeroIndex != -1) 
    {
        cout << zeroIndex + 1 << endl;
    }
    else 
    {
        cout << "NETY" << endl;
    }
    return 0;
}
Leave a Comment