Black-White Mubin | মুবিনের রাফখাতা
Life is like a box of chocolates, you never know what you're going to get..
Tuesday, May 16, 2017
A Tale of Programming : Dynamic Movable Inverse Pyramid n rows
#include<stdio.h>
main()
{
int n;
printf("Enter n: "); scanf("%d",&n);
for(;;)
{
for(int i=0;i<n;i++)
{
for(int j=1;j<=1+i;j++)
{
printf(" ");
}
for(int j=1;j<=n-i;j++)
{
printf("* ");
}
printf("\n");
}
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment