0

Can any one explain the program to generate sequence of numbers(Line sequence & triangle sequence)the following clearly ?

output: line sequence : -3 4 -6 10 -18 34 -66 130 -258 514 -1024 and traingle seq: 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9

8th Feb 2017, 3:15 PM
Srinath G
Srinath G - avatar
2 Answers
0
please give the code also as there are many ways to do it
19th Feb 2017, 1:04 PM
Meharban Singh
Meharban Singh - avatar
0
using for loop and other control statements..,
19th Feb 2017, 1:08 PM
Srinath G
Srinath G - avatar