1.å
³äºcè¯è¨ä¸çrand()
å ³äºcè¯è¨ä¸çrand()
å 为éæºæ°ç§åä¸å
ç¨srand设置ä¸ä¸ªä¸åçéæºæ°ç§åå³å¯
ä¾ç¨
/* rand example: guess the number */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main ()
{
int iSecret,源码一笔画红包源码 iGuess;
/* initialize random seed: */
srand ( time(NULL) );
/* generate secret number: */
iSecret = rand() % + 1;
do {
printf ("Guess the number (1 to ): ");
scanf ("%d",&iGuess);
if (iSecret<iGuess) puts ("The secret number is lower");
else if (iSecret>iGuess) puts ("The secret number is higher");
} while (iSecret!=iGuess);
puts ("Congratulations!");
return 0;
}
深圳开展“合理用药 拒绝滥用”宣传活动
源码淘宝登录
源码资源ym
focusky源码下载
國家級警報大響!對流旺盛「慎防暴雨、雷擊」 12縣市大雨下到晚上
gitee源码部署