Pages

Thursday, 4 August 2016

Logic Pyramid Solution

Hey all..

I am here today to explain you about how to solve the Logic Pyramid problem as below..

Yeah if the user gives input as n then we have to build a n sized pyramid like this with the specified series..

  00006
 00028 00066
00120 00190 00276
First Logic of series

let 6 and 28 be known
so
Eg
Case 1#

28 - 6 = 22
22+ 16=38
38+28 = 66

Case 2#

66  -  28 =  38
38 + 16 = 54
54 + 66 = 120

Now Code for this in C Language