Skip to main content
Search
Search This Blog
Adsense
CFETCH
Share
Get link
Facebook
Twitter
Pinterest
Email
Other Apps
Labels
C Programs
Pattern
Star Pattern
June 22, 2015
Star Pattern-2
*
**
***
****
#include <stdio.h>
int main()
{
int i, j, k,n;
printf("Enter no. of rows for which you want to print*: \n");
scanf("%d",&n);
for(i=n;i>=1;i--)
{
for(j=1;j<i;j++)
{
printf(" ");
}
for(k=n;k>=i;k--)
{
printf("*");
}
printf("\n");
}
return 0;
}
Comments
Popular Posts
January 17, 2014
C program to draw ellipse using Midpoint Ellipse Algorithm.
July 12, 2013
A C Program to ask the price of an item in decimal and separate rupees and paise.
Comments
Post a Comment