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..
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
Code in C Language #
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..
First Logic of series00006
00028 00066
00120 00190 00276
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
Code in C Language #
/*
|
No comments:
Post a Comment