Home › Forums › C Programming › Problem solving few assignments in C language › Reply To: Problem solving few assignments in C language
August 10, 2007 at 5:00 am
#3236
bhavin
Participant
qution no 20: answer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <br /> #include<stdio.h><br /> #include<conio.h><br /> void main()<br /> {<br /> int i,j;<br /> clrscr();<br /> <br /> for(i=1;i<=5;i++)<br /> {<br /> if(i==4)<br /> i=4+1;<br /> for(j=1;j<=i;j++)<br /> {<br /> printf("*");<br /> }<br /> printf("n");<br /> }<br /> getch();<br /> } |
output:
*
**
***
*****