Our Blog Contain Detail about Some Technical Aspect like Programming, Blogger, Tools and Tip, Suggestion, Motivational, Health, Program in C and Java, Html

Write a program to draw the following figure

Write a program to draw the following figure:

3 2 1

21

1

*

**

***



Program in C Language

#include<stdio.h>
#include<conio.h>
void main()
{
     int i,j;
     for(i=3;i>=1;i--)
     {

           for(j=i;j>=1;j--)
          {
           printf("%d",j);
          }
          printf("\n");
     }
     for(i=1;i<=3;i++)
     {

           for(j=1;j<=i;j++)
          {
           printf("*");
          }
          printf("\n");
     }
getch();
}


Share:

No comments:

Post a Comment

Translate

Followers

Email Subscription

Enter your email address:

Delivered by FeedBurner

Recent Posts

Theme Support

Need our help to upload or customize this blogger template? Contact me with details about the theme customization you need.