here's my question:
write a program that asks the user to type the value of N and writes this picture :
N=1
*
N=2
**
*
N=3
***
**
*
here's my work:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int numOfStars = 0;
int count = 0;
do
{
printf("N=");
scanf ("%d",&numOfStars);
if (numOfStars != 9999)
{
for (count < numOfStars; ++count;)
printf("*");
}
printf("endl");
}
while (numOfStars != 9999);
system("PAUSE");
return 0;
}
MY problem is that when run, and enter a number it become endless loop
any help please
thanks