#include<stdio.h>#include<stdlib.h>#include<time.h>intmain(){ intnum; srand((unsigned)time(NULL)); intret=rand()%100+1; while(1) { printf("请输入一个数字>>\n"); scanf("%d",&num); if(num>ret) printf("猜大了!"); if(num<..
分类:
编程语言 时间:
2015-12-08 07:16:28
阅读次数:
128
You are playing the followingBulls and Cowsgame with your friend: You write down a number and ask your friend to guess what the number is. Each time y...
分类:
其他好文 时间:
2015-12-04 10:31:27
阅读次数:
102
题目描述Description小明玩一个数字游戏,取个n行n列数字矩阵(其中n为不超过100的奇数),数字的填补方法为:在矩阵中心从1开始以逆时针方向绕行,逐圈扩大,直到n行n列填满数字,请输出该n行n列正方形矩阵以及其的对角线数字之和.输入描述Input Descriptionn(即n行n列)输出...
分类:
其他好文 时间:
2015-11-22 21:53:04
阅读次数:
235
#include<stdio.h>
#include<Windows.h>
#include<stdlib.h>
#include<stdio.h>
#include<Windows.h>
#include<stdlib.h>
#include<time.h>
voidoutput()
{
printf("*********************欢迎玩猜数字游戏***********************..
分类:
编程语言 时间:
2015-11-05 00:52:38
阅读次数:
255
1、题目名称 Bulls and Cows(猜数字游戏) 2、题目地址 https://leetcode.com/problems/bulls-and-cows/ 3、题目内容 英文:You are playing the following Bulls and Cows game with your friend: You write a...
分类:
其他好文 时间:
2015-11-01 00:30:51
阅读次数:
167
#include<stdio.h>
#include<time.h>
#include<stdlib.h>
voidprint()
{
printf("**************************\n");
printf("*******1.start********\n");
printf("*******0.exit********\n");
printf("**************************\n");
}
voidplay(i..
分类:
其他好文 时间:
2015-10-30 15:32:29
阅读次数:
112
#include<stdio.h>//猜数字游戏#include<stdlib.h>intmain(){inti=0;printf("猜数字小游戏\n");printf("********************************\n");printf("**********1开始**************\n");printf("**********0退出游戏***********\n");printf("******************..
分类:
其他好文 时间:
2015-10-29 16:25:59
阅读次数:
151
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
intmain()
{
intinput=1;
while(input)
{
printf("***********************\n");
printf("*****>1.开始游戏*******\n");
printf("*****>0.退出游戏*******\n");
printf("*********..
分类:
其他好文 时间:
2015-10-29 07:23:29
阅读次数:
139
#include<stdio.h>#include<stdlib.h>#include<time.h>intmain(){ intinput=1; printf("欢迎使用猜数字游戏\n"); while(input) { printf("**********************\n"); printf("*******1.start******\n"); printf("*******0.exit******\n"); printf("*******..
分类:
编程语言 时间:
2015-10-28 07:12:19
阅读次数:
181
大家一起来玩一个小游戏吧!srand((unsignedint)time(NULL));//设置随时间变化的随机数ret=rand()%100;//产生0~100随机数添加#include<time.h>改变100的值,使其产生0~其他的随机数.自定义游戏菜单menu.#include<stdio.h>
#include<stdlib.h>
#include<ti..
分类:
编程语言 时间:
2015-10-15 06:34:57
阅读次数:
279