锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产午夜精品久久久久九九,国产午夜精品理论片久久,欧美亚洲国产精品久久http://www.shnenglu.com/dragon/archive/2010/12/02/135242.htmlDragonDragonThu, 02 Dec 2010 02:19:00 GMThttp://www.shnenglu.com/dragon/archive/2010/12/02/135242.htmlhttp://www.shnenglu.com/dragon/comments/135242.htmlhttp://www.shnenglu.com/dragon/archive/2010/12/02/135242.html#Feedback0http://www.shnenglu.com/dragon/comments/commentRss/135242.htmlhttp://www.shnenglu.com/dragon/services/trackbacks/135242.html
/**//* *鍦?鍒?00鐨勮寖鍥村唴杈撳叆涓涓暟錛岀數(shù)鑴戝氨浼?xì)鐜╃寽鏁板瓧娓告垙浜?br>*/ #include<stdlib.h> #include<stdio.h> #include<time.h> #define getrandom( min, max ) ((rand() % (int)(((max) + 1) - (min))) + (min)) void main() { int num,num1,num2,num3; srand((int)time(NULL)); printf("please int a num from 1~100:"); scanf("%d",&num); num1=1; num2=100; while(1) { num3=getrandom(num1,num2); if(num==num3) { printf("\n\nAHA!!You are right!\n"); printf("The number is %d\n",num); break; } elseif(num<num3) { printf("your number %d is bigger than the answer!\n",num3); printf("please input another num(%d - %d):\n",num1,num3-1); num2=num3-1; } elseif(num>num3) { printf("your number %d is smaller than the answer!\n",num3); printf("please input another num(%d - %d):\n",num3+1,num2); num1=num3+1; } } }