QUOTE(prerna_happiness @ 3 Jul, 2006 - 08:49 AM)

QUOTE(print a pyramid of * of 3 row @ 03 july, 2006 - 09:15 PM)
Finally!
how to print
*
* *
* * *
the ques is of pyramid but here its is not printing in right way
Is anyone kind enough to help me
Hi
change the number.......i<9....for the size of the pyramid you want this one is 9 but change it to 3 for your one hope this helps
madmax
CODE
#include <stdio.h>
// continue.c
int main(void)
{
char letter="a";
char display;
char output;
int rows;
char spaces=' ';
printf("Type a single lowercase letter and press enter:");
scanf("%c",&letter);
while((letter<96) || (letter>122))
{
if((letter>96) || (letter<122))
{
printf("That is not a lowercase letter ("%c", letter), enter a lowercase letter:");
scanf("%c",&letter);
}
else if((letter>96) || (letter<122))
{
while(1)
{
letter=letter-32;
printf(letter-1);
printf("\n\n");
spaces=letter-1;
putchar(spaces);
letter++;
spaces++;
}
}
}
return 0
EDIT : Added tags - b2c
This post has been edited by born2c0de: 6 Nov, 2006 - 05:01 AM