Opening the reading…
Opening the reading…
DSA FUNDAMENTALS › ARRAY BASICS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Complete the C++ function so it checks every pair of distinct indices in [4, 2, 7, 1]. It must return true when the nested loops reach 7 + 1 = 8, then print the result.
OUTPUT
Sampletrue
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.