CJCoding With Joseph
15free / daySign inCreate account

front and back

An array<int, 3> named a has been created with the values {3, 5, 9}.

Print two lines: the word First:, a space and the first element, then the word Last:, a space and the last element. Use front() and back() rather than a[0] and a[2].

Expected Output:

First: 3
Last: 9

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
STL Containersstd::array
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.