Wednesday, August 21, 2013
******
*****
****
***
**
*
**
***
****
*****
******
1
12
123
1234
12345
123456
12345
1234
123
12
1
Source Code :
#include<stdio.h>
int main()
{
int i, j;
for(i=1;i<=6;i++){
for(j=i;j<=6;j++){
printf("*");
}
printf("\n");
}
for(i=2;i<=6;i++){
for(j=1;j<=i;j++){
printf("*");
}
printf("\n");
}
printf("\n\n");
for(i=1;i<=6;i++)
{
for(j=1;j<=i;j++)
{
printf("%d", j);
}
printf("\n");
}
for(i=5;i>=1;i--)
{
for(j=1;j<=i;j++)
{
printf("%d", j);
}
printf("\n");
}
return 0;
}
0 comments:
Post a Comment