#include int main(){ int i, j; for(i = 1; i <= 10; i = i + 1) { for(j = 1; j <= i; j = j + 1) printf("*"); printf("\n"); } return 0;}
#includemain(){int i,j;clrscr();for(i=1;i<=12;i+=2){for(j=1;j<=1;j++){printf("*");}printf("\n");}getch();}
how about reversing it ??like this *******************************************************
#includeint main(){int i,j;clrscr();for(i=12;i>=1;i-=2){for(j=1;j<=i;j++){printf("*");}printf("\n");}getch();return(0);}
Thanks Levin...
how about while statements
#include
ReplyDeletemain()
{
int i,j;
clrscr();
for(i=1;i<=12;i+=2)
{
for(j=1;j<=1;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
how about reversing it ??
ReplyDeletelike this
**********
*********
********
*******
******
*****
****
***
**
*
#include
ReplyDeleteint main()
{
int i,j;
clrscr();
for(i=12;i>=1;i-=2)
{
for(j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
getch();
return(0);
}
Thanks Levin...
ReplyDeletehow about while statements
ReplyDelete