Untitled
unknown
c_cpp
2 years ago
391 B
2
Indexable
#include <iostream> using namespace std; int main() { int mass[100]; int i = 0; int n; cin >> n; while (n != -1) { mass[i] = n; i++; cin >> n; } int centralniyindex = i / 2, centralnoechislo = mass[centralniyindex]; if (i == 0) cout << "empty"; else cout << centralnoechislo; return 0; }
Editor is loading...
Leave a Comment