← All problemsSign in

Number pattern

Print the following pattern: INPUT: 4 OUTPUT: 1 4 6 9 11 13 16 18 20 22 #### Note: Input has to be taken dynamically and not static (i.e HARDCODED INTO PROGRAM) ### Example In C : **_int a = scanf(%d, &n);_** In Java : **_Scanner sc = new Scanner(System.in);_** **_int a = sc.nextInt();_** In Python 3.6 : **_num = int( input())_** #### Use simi

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start