标签:game guess print include scan rand main welcome oid
/*简单猜数游戏,magic number#1,版本*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int magic; /*magic number*/
int guess; /*user‘s guess*/
printf("\nWelcome to the magic number game\n");
magic=rand(); /*产生随机数*/
printf("\nGuess the magic number:");
scanf("%d",&guess);
if(guess==magic)
printf("***Right***\n");
system("PAUSE");
return 0;
} /*end main*/
标签:game guess print include scan rand main welcome oid
原文地址:http://www.cnblogs.com/hgr123456/p/6498497.html