Course Solutions Uncategorized (Solved) : Language C 1 Please Save Program Name Trianglec Write Nested Loop Prints Following Output Q30120883 . . . .

(Solved) : Language C 1 Please Save Program Name Trianglec Write Nested Loop Prints Following Output Q30120883 . . . .

 

Language C

1. Please save the program with the name‘triangle.c’
Write a nested for loop that prints the following output:
1
1 2 1
1 2 4 2 1
1 2 4 8 4 2 1
1 2 4 8 16 8 4 2 1
1 2 4 8 16 32 16 8 4 2 1
1 2 4 8 16 32 64 32 16 8 4 2 1
1 2 4 8 16 32 64 128 64 32 16 8 4 2 1
Hint: Here is the psudocode solution:
for row from 0 to 7 {
pad leading blanks in a row like this
for the column from 1 to 7-row:
print

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : 1 List Nodes Left Sub Tree Root 2 List Ancestors Node 12 3 List Proper Ancestors Node 12 4 Q28095610 . . . .(Solved) : 1 List Nodes Left Sub Tree Root 2 List Ancestors Node 12 3 List Proper Ancestors Node 12 4 Q28095610 . . . .

<p><img alt="15 16 12 20 10 13 18 23" src="https://s9.postimg.org/eeudlk9zj/screenshot_403.png" aria-describedby="d3f"/></p><p>1- List the nodes of the left sub-tree of the root:</p><p style="margin-left:54pt;"/><p>2- List the ancestors of node 12:</p><p>3- List the