Print Odd Indices Problem

Print Odd Indices Problem — ExecCode School DSA Practice

Solve the Print Odd Indices problem on ExecCode. Free online school DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.

Problem description

You are given a list of whole numbers. Your task is to solve Print Odd Indices. Print the values that sit at odd index positions (1, 3, 5, and so on).

Examples

Input 4 10 20 30 40; Output 20 40. Input 5 1 2 3 4 5; Output 2 4

Constraints

1 <= N <= 1000

Practice Print Odd Indices free on ExecCode. Browse DSA problems, topic map, and placement guides.