Example
If input is 2, output will be
00006
00028 00066
If input is 3, output will be
00006
00028 00066
00120 00190 00276
3 answers
6 + (6+16=22) 22 = 28
28 +(22+16 =38) 38 = 66
66 + (38+16 =54) 54 = 120
120 +(54+16 = 70) 70 = 190
190 + (70 + 16 = 86) 86 = 276
Note: 16 is the key value
-
can anyone give the code for it
I have given only the logic try to implement in program ……..
y=6;
x=6;
print the value of x
Place the below lines in loop so that the process gets repeated
x=x+16;
z=y+x;
print the value of z
y=z;