猜年龄
来源:互联网 发布:显示帧数的软件 编辑:程序博客网 时间:2024/04/29 19:46
#include <stdio.h>
#include <math.h>
main(){
int i,m,age=0,n=0,flag;
char c ,d;
printf("this is guess age game!\n");
do{
for(i=0;i<7;i++)
{
system("cls");
for(m=0;m<128;m++)
{
if((m>>i)%2==1)
{printf("%5d",m);
n=n+1;
if(n==8){
printf("\n");
n=0;}
}
}
scanf("%c",&c);
if(c=='y')
flag=1;
else flag=0;
age^=flag<<i;
}
printf("the number is :%5d\n",age);
printf("do you want go?");
scanf("%c",&d);
}while(d=='y') ;
getch();
}
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 猜年龄
- 2013年蓝桥杯 猜年龄
- 猜年龄 - 蓝桥杯
- 猜年龄 蓝桥杯
- [经验总结] HIT CS科班对计算机专业素养的理解
- Linux -- sed
- NoSQL架构实践(三)——以NoSQL为缓存
- android 模仿书的翻页(附带源码)
- OpenCV新版本模块结构
- 猜年龄
- 终于大概明白makefile了
- struct rlimit介绍
- 新框架dwcr.jsp界面按钮变乱解决方法
- 在一个网页上控制另一个网页的刷新
- Ant编译、运行、打包JAVA工程,并生成api文档
- oracle 创建表空间 创建表 创建用户
- 基于ALSA的WAV播放和录音程序
- 使用Autobahn的远程调用模式