// 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;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter