#include <stdio.h>
main ()
{
int height;
int star = 0;
printf("How high would you like the pyramid?\n");
scanf("%d",&height);
if (height > 30) {
printf("Pick another height (must be between 1 and 30):\n");
scanf("%d",&height);
}
while (star!=height) {
printf("*");
printf("*\n");
star=star+1;
}
return 0 ;
}
this is what i did ...
but i want it to be a pyramid in shape printed with "*"
thx for reading



LinkBack URL
About LinkBacks


