tag:blogger.com,1999:blog-5531960551406702359.post2036399812912402570..comments2024-03-11T00:35:57.247+05:30Comments on C Programming | Computer | Ms-Excel: 9.Design numbers rectangle structureDinesh Berahttp://www.blogger.com/profile/17779626530091691900noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5531960551406702359.post-56451832663493631162013-04-29T13:34:23.815+05:302013-04-29T13:34:23.815+05:30@pritesh,
for(c=num;c>=1;c--)
we use c=num bc...@pritesh,<br /><br />for(c=num;c>=1;c--)<br /><br />we use c=num bcoz we want to repeat room equal to num every times. So if assume num=5 then, c=num(i.e. c=5)<br />Now checking condition c>=1(i.e. 5>=1)<br />condition true, so compiler goes into loop and execute statement in it.<br />When all statement are executed then compiler goes to third part of for loop(i.e. increment/decrement) and in our program it is decrement (i.e. c--) so now c value is 4.<br /><br />Now second times condition check 4>=1,<br />condition true,<br />compiler goes into loop and statement executed,<br />When its over, compiler goes to increment/decrement part of for loop,<br />.<br />.<br />.<br />(Hence, its continue till the condition not false).<br /><br />We are run differ loop as our required pyramid program.<br />Just look out loop concept at:<br /><br />http://cprogrammingcodes.blogspot.in/p/c-tutorial.html<br />Dinesh Berahttps://www.blogger.com/profile/17779626530091691900noreply@blogger.comtag:blogger.com,1999:blog-5531960551406702359.post-71476302721591537792013-04-29T12:12:47.769+05:302013-04-29T12:12:47.769+05:30sir i cant understand why for(c=num;c>=1;c--)
p...sir i cant understand why for(c=num;c>=1;c--)<br />plz reply todayAnonymousnoreply@blogger.com