1.å
³äºcè¯è¨ä¸çrand()
å ³äºcè¯è¨ä¸çrand()
å 为éæºæ°ç§åä¸å
ç¨srand设置ä¸ä¸ªä¸åçéæºæ°ç§åå³å¯
ä¾ç¨
/* rand example: guess the number */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main ()
{
int iSecret,067棋牌源码组件 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;
}
修仙西游源码_修仙西游源码大全
大气新闻源码_新闻资讯源码
赚网源码
阿尔萨斯源码_阿尔萨斯my son,cg
canvas 截图 源码_canvas截图原理
加油源码购买_加油源码购买怎么退款