skylove888888的一个game:编了一个数字魔术的小程序
来源:互联网 发布:阿里云域名前面是什么 编辑:程序博客网 时间:2024/04/27 23:45
#include <stdio.h>
#include <stdlib.h>
int main() {
printf("######### MAGIC GAME #########\n");
int G1[6][30] = {
{ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59 },
{ 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 31, 34, 35, 36, 39, 42, 43, 46, 47, 50, 51, 54, 55, 58, 59 },
{ 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 31, 36, 37, 38, 39, 44, 45, 46, 47, 52, 53, 54, 55, 60 },
{ 8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31, 40, 41, 42, 43, 44, 45, 46, 47, 56, 57, 58, 59, 60 },
{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60 },
{ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60 }
};
printf("\n");
printf("Please guess a number called 'BIG BONG' form 1 to 60 in your heart!\n");
printf("\n");
static int BIG_BONG = 0;
int choice;
for (int i = 0; i<6; i++){
printf("\n");
printf("the BIG BONG in these numbers?\n");
printf("==============================\n");
for (int j = 0; j<30; j++)
printf("%d, ", G1[i][j]);
printf("\n");
printf("==============================\n");
printf("Yes:1 No:2 \n");
printf("\n");
scanf_s("%d", &choice);
if (choice == 1){
BIG_BONG += G1[i][0];
continue;
}
else if (choice == 2){
BIG_BONG += 0;
continue;
}
else
break;
}
printf("BIG BONG is: %d\n", BIG_BONG);
printf("######### GAME End #########\n");
system("PAUSE");
return 0;
}
#include <stdlib.h>
int main() {
printf("######### MAGIC GAME #########\n");
int G1[6][30] = {
{ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59 },
{ 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 31, 34, 35, 36, 39, 42, 43, 46, 47, 50, 51, 54, 55, 58, 59 },
{ 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 31, 36, 37, 38, 39, 44, 45, 46, 47, 52, 53, 54, 55, 60 },
{ 8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31, 40, 41, 42, 43, 44, 45, 46, 47, 56, 57, 58, 59, 60 },
{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60 },
{ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60 }
};
printf("\n");
printf("Please guess a number called 'BIG BONG' form 1 to 60 in your heart!\n");
printf("\n");
static int BIG_BONG = 0;
int choice;
for (int i = 0; i<6; i++){
printf("\n");
printf("the BIG BONG in these numbers?\n");
printf("==============================\n");
for (int j = 0; j<30; j++)
printf("%d, ", G1[i][j]);
printf("\n");
printf("==============================\n");
printf("Yes:1 No:2 \n");
printf("\n");
scanf_s("%d", &choice);
if (choice == 1){
BIG_BONG += G1[i][0];
continue;
}
else if (choice == 2){
BIG_BONG += 0;
continue;
}
else
break;
}
printf("BIG BONG is: %d\n", BIG_BONG);
printf("######### GAME End #########\n");
system("PAUSE");
return 0;
}
0 0
- skylove888888的一个game:编了一个数字魔术的小程序
- 一个简单的数学小魔术
- 编一个小程序体会一下lei的感觉
- 编小一个最小的C语言程序
- C#学习一:编一个可以画线的小程序
- 我编了一个0.1盖茨的程序
- arm9板子上写了一个小程序:手写数字及英文大小写字符的识别
- 写一个简单猜数字游戏的小程序
- 一个简单的数字幸运抽奖小程序
- 编一个程序求质数的和
- 编一个c的冒泡程序
- 编一个程序的辛酸历程
- 编一个程序求质数的和
- 编一个折半查找的程序
- Help!编了一个计算器的程序,却出了一点问题。
- 编的小程序
- 一个有待完善的java小程序 上完3节java课后自己编的
- 我自己编的一个c语言小程序:银行基本功能的实现
- ios构造httpPost头结构
- shell 变量
- 外部排序 之 概念篇
- 用SoapUI免费版测试OFBiz Web Servcies
- Oracle归档日志使用情况查询
- skylove888888的一个game:编了一个数字魔术的小程序
- 怎样构建一个GIT服务器(How to Construct A GIT Server)
- C#直接调用DLL导出函数
- 【leetcode】merge-two-sorted-lists
- poj1305(本原勾股数组)
- _T(windows使用两种字符集ANSI和Unicode)
- Русский язык
- POJ--1094--Sorting It All Out【拓扑排序】
- hdu 2795