• 博客(0)
  • 资源 (7)

空空如也

你必须知道的495c语言个问题

你必须知道的495个c语言个问题

2013-04-21

猜数字游戏代码

#include<stdio.h> #include<stdlib.h> int fenshu=0,lishizuigaofen,dangqianzuigaofen; int panduan(int shu,int caishu) { if(caishu>shu) { printf("大了,"); } if(caishu<shu) { printf("小了,"); } }

2013-04-21

俄罗斯方块代码

#include<stdio.h> #include<stdlib.h> #include<windows.h> #include<time.h> #include<conio.h> #define MOD 28 #define SIZE_N 19 #define SIZE_M 12 int cur_x,cur_y; int score,mark,next,map[SIZE_N][SIZE_M],Gamespeed=300; int shape[28][6]={ {0,-1,0,-2,1,0}, {0,1,1,0,2,0}, {-1,0,0,1,0,2}, {0,-1,-1,0,-2,0}, {0,-1,0,1,-1,0}, {0,1,1,0,-1,0}, {1,0,0,-1,0,1}, {1,0,-1,0,0,-1}, {-1,1,0,1,1,0}, {0,-1,1,0,1,1}, {-1,0,0,-1,1,-1}, {-1,-1,-1,0,0,1}, {-1,0,0,1,1,1}, {0,1,1,-1,1,0}, {-1,0,0,1,1,1}, {0,1,1,-1,1,0}, {-1,0,0,-1,0,-2}, {-1,0,-2,0,0,1}, {0,1,0,2,1,0}, {0,-1,1,0,2,0}, {0,1,1,0,1,1}, {0,-1,1,0,1,-1}, {-1,0,0,-1,-1,-1}, {-1,0,-1,1,0,1}, {0,1,0,2,0,3}, {1,0,2,0,3,0}, {0,-1,0,-2,0,-3}, {-1,0,-2,0,-3,0} }; void gotoxy(int x,int y){ COORD c; c.X=x-1; c.Y=y-1; SetConsoleCursorPosition (GetStdHandle(STD_OUTPUT_HANDLE), c); } void Gameover(){ int i,j,flag=0;

2013-04-21

vc++6.0支持win7

win7兼容性说明: 安装完后运行时,如遇到win7的兼容性提示窗口,请选择“不再提示”复选框后点击“运行”按钮。 其他问题: 安装完成后,在安装目录下还有一个“使用说明”,如遇无法运行等问题时,请参考此说明解决。

2013-04-21

c语言万年历代码

include <stdio.h> main() { void print_head(int x,int y); /*打印头文件*/ void print_month(int x,int y); /*打印月历*/ int days_of_month(int x,int y); /*计算指定年月的天数*/ int leap(int x,int y); /*计算指定年月1号是星期几*/ int i,days,year,month,firstday; char choose; do {printf ("\n\n请输入年(0000~9999):\n\n"); scanf ("%d",&year); if (year<0||year>9999) printf ("错误请重新输入!");} while (year<0||year>9999); printf ("\n\n"); do {printf ("请输入一个月(0~12)\n\n\n"); scanf ("%d",&month); if (month<=0||month>12) printf ("错误请重新输入!");} while (month<=0||month>12); printf ("\n\n"); days=days_of_month(year,month); /*调用函数*/

2013-04-21

c贪吃蛇源代码

/*************************************** * 程序名称:贪吃蛇游戏 * * 编译环境:vs2008 * * 作者相关:往事随风<1034882113>* * 修改时间:2013-04-13 * ***************************************/ #include <graphics.h> #include <conio.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <dos.h> #include <string.h>

2013-04-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除