December 6th, 2013, 02:20 AM
Print Diamond in C program in Decrement loop
Its very famous C program every one know Diamond print in C program. in this program firstly take inpute from user then print number of rows as per user required.
just like user give input '3'
the result show like this:
now i wanna make opposite this program if user give input the result will show like this:
its mean we are running decrement loop in this program. i m tying again and again for converting my program like this situation but i failed many times plese check my syntax and guide me what should i chang in syntax for printing decrement result.
This below syntax is giving output in increment form.
printf("\nEnter the number of row: ");
for(i = 0; i<=num1; i++)
for(j = 1; j<=i; j++)
December 6th, 2013, 04:41 AM
You will have the loop to go from num to 0 and then decreasing i.
December 6th, 2013, 09:59 AM
Use the original program, print, turn page upside down.
mmm. Better still, use your monitor configuration settings to show the display upside down.
Stand on head?
Roll your tv?
Last edited by b49P23TIvg; December 6th, 2013 at 10:01 AM.
[/code] are essential for python code and Makefiles!
December 6th, 2013, 06:14 PM
Last edited by salem; December 6th, 2013 at 06:17 PM.