3. Write the output of the following programs.a.CLSN=7FOR P= 1 TO 5PRINT NIf N MOD 2 =0 THENN=N/2ELSEN=N*3+1END IFNEXT PENDb)CLSN = 9DOIF N MOD 2 =1 THEN PRINT NN = N - 1LOOP WHILE N >= 3END
Output:
7
22
11
34
17
Output:
9
7
5
3
What is control structure?