范文无忧网范文学习范文大全

跪一个C语言程序输出生日快乐

09月27日 编辑 fanwen51.com

[C语言一个薪水计算问题]#include<stdio.h> void main() { int h; double s,income; scanf("%d,%lf",&h,&s); if (h<=40) income = h*s; else if((h>=40)&&(h <= 50)) income = 40*s+(h-40)*1.5*s; el...+阅读

跪一个C语言程序输出生日快乐 TC

#include "Conio.h" #include "graphics.h" #define closegr closegraph char sheng32S[]={ /* 以下是 '生' 的 32点阵宋体 字模,128 byte */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00, 0x00,0x00,0x80,0x00,0x00,0xC0,0x80,0x00, 0x00,0x80,0x80,0x00,0x00,0x80,0x80,0x00, 0x01,0x00,0x80,0x00,0x01,0x00,0x80,0x20, 0x00,0x00,0x80,0x00,0x02,0x00,0x80,0x00, 0x00,0x00,0x80,0x00,0x04,0x00,0x80,0x00, 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00, 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00, 0x00,0x00,0x80,0xC0,0x00,0x00,0x80,0x00, 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00, 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00, 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00, 0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x00, 0x00,0x00,0x80,0x18,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }; char ri32S[]={ /* 以下是 '日' 的 32点阵宋体 字模,128 byte */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x01,0x00,0x00,0x80, 0x01,0x00,0x00,0x80,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }; char kuai32S[]={ /* 以下是 '快' 的 32点阵宋体 字模,128 byte */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x03,0x00,0x60,0x00, 0x02,0x00,0x40,0x00,0x02,0x00,0x40,0x00, 0x00,0x00,0x40,0x00,0x00,0x00,0x40,0x00, 0x00,0x00,0x40,0x40,0x00,0x00,0x40,0x40, 0x00,0x40,0x40,0x40,0x00,0x20,0x40,0x40, 0x00,0x10,0x40,0x40,0x00,0x00,0x40,0x40, 0x10,0x00,0x40,0x40,0x30,0x00,0x40,0x40, 0x00,0x00,0x40,0x40,0x00,0x00,0x40,0x48, 0x00,0x00,0x40,0x00,0x00,0x00,0x40,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00, 0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00, 0x00,0x01,0x02,0x00,0x02,0x02,0x00,0x00, 0x03,0x00,0x01,0x00,0x03,0x00,0x00,0xC0, 0x03,0x00,0x00,0x60,0x03,0x00,0x00,0x30, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }; char le32S[]={ /* 以下是 '乐' 的 32点阵宋体 字模,128 byte */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00, 0x00,0x00,0x0F,0x00,0x01,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, 0x01,0x00,0x00,0x00,0x01,0x00,0x40,0x00, 0x01,0x00,0x40,0x00,0x01,0x00,0x40,0x00, 0x03,0x00,0x40,0x00,0x02,0x00,0x40,0x00, 0x02,0x00,0x40,0x10,0x02,0x00,0x40,0x00, 0x00,0x00,0x40,0x00,0x00,0x00,0x40,0x00, 0x00,0x00,0x40,0x00,0x00,0x30,0x40,0x00, 0x00,0x20,0x41,0x00,0x00,0x40,0x40,0x80, 0x00,0x80,0x40,0x40,0x01,0x00,0x40,0x60, 0x02,0x00,0x40,0x30,0x04,0x00,0x40,0x30, 0x00,0x00,0x40,0x00,0x00,0x00,0x40,0x00, 0x00,0x03,0xC0,0x00,0x00,0x01,0x80,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, }; void drawmat(char *mat,int matsize,int x,int y,int color) /*依次:字模指针、点阵大小、起始坐标(x,y)、颜色*/ {int i,j,k,n; n=(matsize-1)/8+1; for(j=0;j>k)) /*测试为1的位则显示*/ putpixel(x+i*8+k,y+j,color); } void initgr(void) { int gd = DETECT, gm = 0; registerbgidriver(EGAVGA_driver); initgraph(&gd, &gm, ""); } int main(void) { initgr(); /* BGI初始化 */ drawmat(sheng32S,32,50,50,11); drawmat(ri32S,32,100,100,11); drawmat(kuai32S,32,150,150,11); drawmat(le32S,32,200,200,11); getch(); closegr(); return 0; }

编写c语言程序输入一位学生的生日年:yo月:mo日:do

#include

main()

{

int year,month,day;

int birthY,birthM,birthD;

int N;

printf("请输入生日");

scanf("%d%d%d",&birthY,&birthM,&birthD);

printf("请输入当前日期");

scanf("%d%d%d",&year,&month,&day);

N=year-birthY+1; 人一出生是1岁,没有零岁的

if(month

N--;

else

if(month==birthM)

if(day

N--;

printf("年龄为%d\n",N);

return 0;

}

哪位大侠帮忙写一程序c语言版要八位共阳数码管显示19512011

#include#define uchar unsigned char unsigned long num; uchar j,k; uchar a0,b0,c0,d0,e0,f0; sbit dula=P2^6; sbit wela=P2^7; unsigned char code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, 0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0x00}; void delay(uchar i) { for(j=i;j>0;j--) for(k=125;k>0;k--); } void display(uchar a,uchar b,uchar c,uchar d,uchar e,uchar f) { dula=0; P0=table[a]; dula=1; dula=0; wela=0; P0=0xfe; wela=1; wela=0; delay

(5); P0=table[b]; dula=1; dula=0; P0=0xfd; wela=1; wela=0; delay

(5); P0=table[c]; dula=1; dula=0; P0=0xfb; wela=1; wela=0; delay

(5); P0=table[d]; dula=1; dula=0; P0=0xf7; wela=1; wela=0; delay

(5); P0=table[e]; dula=1; dula=0; P0=0xef; wela=1; wela=0; delay

(5); P0=table[f]; dula=1; dula=0; P0=0xdf; wela=1; wela=0; delay

(5); } void main() { num=123456;//这个是被显示的整数,只要不超过六位,均可显示出来。 //同学们可以随意更改这个num变量的值试验下。 while

(1) { if(num

延伸阅读:

用C语言编写一个计算薪水的程序/*工资计算程序*/ #include main() { float originWage; /*应发工资*/ float realWage; /*实发工资*/ float tax; /*所缴税款*/ int i,hour,amount,money; printf("请选择工资种...

求一个示爱的小程序 C语言void a(int aa) {for(int i=0;i<aa;i++)printf(" ");} void b() {printf ("*");} char c(int cc) {printf("%c",cc);return 0;} int main() {a(6);b();a(3);b();a(5);b();a(3);b()...

求一个c语言程序能输出一个大的爱心用符号拼成的不能用printf#include int n; void draw(int n) { int i,j; for (i=1-(n>>1);iif (i>=0) { for (j=0;jfor (j=1;jputchar("\n"); } else { for (j=i;jfor (j=1;jfor (j=1;jfor (j=1;jputch...

工资管理C程序中如何实现文件的读取与输出这个需要用的文件的输入和输出函数。 如fprintf、fgets等等函数。 具体格式由于都是概念性问题,建议认真你看一下c语言文件那一章。 我给你例一个例子,说明一下怎么打开文件和...

祝朋友生日快乐语言在朋友生日到来之际为朋友送上一段搞笑的生日祝福短信,温暖朋友的心灵,让他在生日那天收获你的友谊。 1.送你一杯我精心特调的果汁,里面包含100cc的心想事成,200cc的天天开心,300...

C语言开发一个背单词软件C语言开发一个背单词软件,有什么好用的app背单词:#include#include#includestruct word //定义一个word的结构体,里面的两个成员分别放英语单词和相应的汉语翻译{ char chinese...

编写一个shell脚本程序实现100的阶乘并输出编写一个shell脚本程序实现100的阶乘并输出,linux下的shell脚本:脚本至少有如下错误: {j}改为${j}或$j,是要取值的啊 expr语句外面是反引号(键盘上ESC下面那个键)而不是单引号,表示...

如何用C语言读入和输出excel里的数据如何用C语言读入和输出excel里的数据,在C语言中如何将EXCEL或者文档中的数据读入程序中:简单的方法是通过ODBC来实现: 具体实现 一、 包含Excel文件操作类头文件 #include "CSpr...

跪c语言做的学生选修课程系统设计学生选课系统需分析:接上面: int Del(TSTU list[], int n) { int key, flag ; loop: printf("1.按学号删除\t2.按课程名删除\t0.返回\n") ; do{ printf("请输入功能编号:") ; scanf("%d...

推荐阅读
图文推荐
栏目列表