// You Can Add more than condition at the same for loop
int j{};
string arr[] = { "Yes", "Yes", "Yes", "No", "Yes" };
for(j = 1; arr[j] == "Yes" && j < 5; j++);
cout << j <<endl;