Question: What am I missing with my code? C++ Question: Load 10 integers into an array, then prompt the user for a number from 0 to
What am I missing with my code? C++
Question:
Load 10 integers into an array, then prompt the user for a number from 0 to 9. Display the element at the array position the user selects. For example:
Reading in: 77, 33, 88, 99, 22, 55, 11, 44, 66, 0 Enter a number from 0 to 9: 3 Element number 3 is 99
Code:
#include
int main() { cout>arr[i]; } cout>n; cout
My Output vs Expected:



1 Compare output Input 55 Reading in: Enter a number from 0 to 9: 3 Element number 3 is 99 Your output Reading in: 77, 33, 88, 99, 22, 55, 11, 44, 66, 3 Expected output Enter a number from 0 to 9 Element number 3 is 99
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
