没有合适的资源?快使用搜索试试~ 我知道了~
在Turbo C下运行的计算器
5星 · 超过95%的资源 需积分: 9 13 下载量 178 浏览量
2009-03-10
22:41:20
上传
评论
收藏 6KB TXT 举报
温馨提示
试读
10页
这个是个文本格式,有详细的代码,用以生成计算器,界面有按钮,有加减乘除等运算
资源推荐
资源详情
资源评论
#include<dos.h>
#include<math.h>
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<stdarg.h>
#include<graphics.h>
#include<string.h>
#include<ctype.h>
#define UP 0x48
#define DOWN 0x50
#define LEFT 0x4b
#define RIGHT 0x4d
#define ENTER 0x0d
void *rar;
struct palettetype palette;
int GraphDriver;
int GraphMode;
int ErrorCode;
int MaxColors;
int MaxX,MaxY;
double AspectRatio;
void drawboder(void);
void initialize(void);
void computer(void);
void changtextstyle(int font,int direction,int charsize);
void mwindow(char *header);
int specialkey(void);
int arrow();
#include<math.h>
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<stdarg.h>
#include<graphics.h>
#include<string.h>
#include<ctype.h>
#define UP 0x48
#define DOWN 0x50
#define LEFT 0x4b
#define RIGHT 0x4d
#define ENTER 0x0d
void *rar;
struct palettetype palette;
int GraphDriver;
int GraphMode;
int ErrorCode;
int MaxColors;
int MaxX,MaxY;
double AspectRatio;
void drawboder(void);
void initialize(void);
void computer(void);
void changtextstyle(int font,int direction,int charsize);
void mwindow(char *header);
int specialkey(void);
int arrow();
int main()
{ initialize();
computer();
closegraph();
return(0);
}
void initialize(void)
{int xasp,yasp;
GraphDriver=DETECT;
initgraph(&GraphDriver,&GraphMode,"");
ErrorCode=graphresult();
if(ErrorCode!=grOk)
{printf("Graphics System Error:%s",grapherrormsg(ErrorCode));
exit(1);
}
getpalette(&palette);
MaxColors=getmaxcolor()+1;
MaxX=getmaxx();
MaxY=getmaxy();
getaspectratio(&xasp,&yasp);
AspectRatio=(double)xasp/(double)yasp;
}
void computer(void)
{
struct viewporttype vp;
剩余9页未读,继续阅读
资源评论
- yuanruiting2013-04-18运行后提示“Function ‘bioskey’ should have a prototype” 为什么呢? 你的不需要bios.h吗?
lipei1987_2007
- 粉丝: 1
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 我分享个魔兽内存修改器
- Python毕业设计基于Django的网易云数据分析可视化大屏系统的设计与实现+使用说明+全部资料(优秀项目).zip
- Python毕业设计基于Django的网易云数据分析可视化大屏系统的设计与实现+使用说明+全部资料(高分项目).zip
- JavaScript实现的鼠标手势
- 人工兔优化算法ARO MATLAB源码, 应用案例为函数极值求解以及优化svm进行分类,代码注释详细,可结合自身需求进行应用
- 人才网站设计-asp.net+sql-(系统源码)
- asp.net+sql人才网站设计-含系统源码
- C#应用的用户配置窗体方案
- python实现绘制爱心图形的代码
- JAVAWEB项目-校园订餐系统项目源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功