Write a program to produce the following output:
void main()
{
int storec=0,x=0,storex=1,counter,count;
for(counter=1;counter>storec;counter++)
{
storec=counter;
printf("\n");
for(x=storex,count=1;count<=storec;x++,count++)
{
if(x==2)
printf(" ");
if(x==4)
printf(" ");
if(x==1)
printf(" ");
if(x==3||x==5||x==8||x==6||x==9||x==10)
printf(" %d",x);
else
printf("%d",x);
storex=x+1;
}
if(storex==11)
storec=999;
}
}
Subscribe to:
Post Comments (Atom)
thank you bbb
ReplyDeleteit is not printing in this pattarn...
ReplyDeletethanx a lot
ReplyDeleteit is not printing in this pattern...
ReplyDeleteDeepansh's program is working too :-)
ReplyDeleteNo ,it doesn't work. There are no spaces between the numbers.
ReplyDeletebegharta
ReplyDeletebisti feel kr ....
Delete