产生随机数:
#include <stdio.h> #include <time.h> #include <stdlib.h> int main(void) { srand( time(NULL) ); int n=rand() % 100;
printf("n=%d",n); return 0; }
%表示除以一个数取余数,所以%100就把数的范围定在了0-100;
调试:
单步:进入下个语句
step into:如果下个语句是函数,进入函数
step over:如果下个语句是函数,跳过
step out:跳出当前函数与循环
continue:执行语句直到下个断点