The question is painfully simple and I feel that I am close, but I got stuck in the monitor and walked around. It is necessary that cout would output "Yes" if this is the first element and "No" if it is some other one. I know that if has to be described differently, but I just don’t know how to describe it.
#include<iostream> using namespace std; int main() { int _size; cin >> _size; int* tab = new int [_size]; int number; for(int i=0;i<_size;i++){ cin >> number; tab[i] = number; } for(int i=0; i<_size; i++) { if(tab[0]) cout << "Yes" << endl; else cout << "No" << endl; } }
if(tab[0]), butif (i == 0)- avp_size) - this is reserved for the compiler. - Harry