各位谁能帮我看看这个程序,给他调试成显示100个三位数而不是10个数啊?
#include <stdlib.h>#include <stdio.h>
#include <time.h>
void main( void )
{
int i;
int count = 0;
srand( (unsigned)time( NULL ) );
while(count < 10)
{
i = rand();
if((100 <= i)&&(i <= 999))
{
printf( "%d\t%6d\n ", count,i);
count++;
}
}
getch();
}
--------------------编程问答-------------------- while(count < 100) --------------------编程问答-------------------- ……
count 是计数的。
补充:移动开发 , 移动开发其他问题