Print Third Element
easyQuestion 93An array called nums has already been created for you with the values {10, 20, 30, 40, 50}.
Your task is to print the third element of the array.
Remember that arrays in C++ are zero-indexed: - Index 0 = first element (10) - Index 1 = second element (20) - Index 2 = third element (30)
So the "third" element is actually at index 2, not index 3.
Expected output
30= newline. No newline after the last line.
Hints2 available
Sign in to use hintsTopics
Arrays
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.