单步调试的时候控制台打不了字 有时候可以打字 有时候不能打字

img

第8行:printf("随机生成的数",&n); ()里面多了 ,&n,正确的为:printf("随机生成的数");

如果想生成随机数,应该这么写:

头文件包含: #include<time.h>

代码里:
srand((unsigned int )time(NULL));
n = rand()%100;