Sign in to run tests against edge cases and save your code automatically.
Problem Description
Hard
Find Index of Value
Sorting & Searching
1D & 2D Arrays
Iteration & Loops
Write a program that inputs 5 numbers sequentially to populate an array, and then inputs a target number `T`. Output the 1-based position (1 to 5) of the first occurrence of `T`. If it is not found, output -1.
Example Input
10
20
30
40
50
30
Example Output
3
Success Rate:
0% (0 passed / 0 attempted)
Code
Draft auto-saved
Test Results
Click "Test Code" to evaluate your code against the tests.