c 语言编译是什么意思,我有个C语言编译程序,但是不知道是什么意思,望大家解释哈,在下...
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
我的QQ号;106173262
程序如下:
/*
#include "stdio.h"
#include "string.h"
#define N 3
struct CJ{
double Ch;
double math;
double Eng;
};
struct students{
char name[20];
struct CJ cj;
double sum;
double avg;
};
void input(struct students *p,int len);
void sort(struct students *p,int len);
void output(struct students *p,int len);
void main(){
struct students stu[N];
input(stu,N);
sort(stu,N);
output(stu,N);
getchar();
getchar();
}
void input(struct students *p,int len){
int i=0;
for(;i
printf("\n请输入学生的名字:");
fflush(stdin);
gets(p[i].name);
printf("\n请输入语文成绩:");
scanf("%lf",&p[i].cj.Ch);
printf("\n请输入数学成绩:");
scanf("%lf",&p[i].cj.math);
printf("\n请输入英语成绩:");
scanf("%lf",&p[i].cj.Eng);
p[i].sum=p[i].cj.Ch+p[i].cj.math+p[i].cj.Eng;
p[i].avg=p[i].sum/3.0;
}
}
void sort(struct students *p,int len){
struct students temp;
int i,j;
for(i=0;i
for(j=i+1;j
if(p[i].sum
temp=p[i];
p[i]=p[j];
p[j]=temp;
}
}
void output(struct students *p,int len){
char mingci[3][20]={"状元","榜眼","探花"};
int i;
printf("**********0607S1班级学生成绩管理系统*********\n");
printf("---------------------------------------------\n");
printf("名次 姓名 总分 平均分\n");
for(i=0;i
printf("%s%10s%14.2lf%12.2lf\n",mingci[i],p[i].name,p[i].sum,p[i].avg);
}
*/
/*
#include "stdio.h"
#include "string.h"
struct sjx{
float bian[3];
};
void panduan(struct sjx p);
void main(){
struct sjx len;
int i;
for(i=0;i<3;i++){
printf("\n请输入三角形的第%d条边:",i+1);
scanf("%f",&len.bian[i]);
}
panduan(len);
}
void panduan(struct sjx p){
int i=0;
if((p.bian[0]==p.bian[1]) && (p.bian[1]==p.bian[2]) && (p.bian[0]==p.bian[2]))
printf("此三角形为等边三角形\n");
else if((p.bian[0]==p.bian[1]) || (p.bian[1]==p.bian[2]) || (p.bian[0]==p.bian[2]))
printf("此三角形为等腰三角形\n");
else
printf("此三角形为不等边三角形\n");
}
*/
#include "stdio.h"
#include "string.h"
struct riqi{
int year;
int month;
int day;
};
int nian(struct riqi p);
void main(){
struct riqi rq;
int flag;
printf("请输入年份:");
scanf("%d",&rq.year);
printf("请输入月份:");
scanf("%d",&rq.month);
printf("请输入日期:");
scanf("%d",&rq.day);
flag=nian(rq);
printf("明天的日期为:");
switch(rq.month){
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:{if(rq.day<31)
printf("%d年%d月%d日\n",rq.year,rq.month,rq.day+1);
else
printf("%d年%d月%d日\n",rq.year,rq.month+1,1);
}break;
case 12:{if(rq.day<31)
printf("%d年%d月%d日\n",rq.year,rq.month,rq.day+1);
else
printf("%d年%d月%d日\n",rq.year+1,1,1);
}break;
case 4:
case 6:
case 9:
case 11:{if(rq.day<30)
printf("%d年%d月%d日\n",rq.year,rq.month,rq.day+1);
else
printf("%d年%d月%d日\n",rq.year,rq.month+1,1);
}break;
case 2:{if(flag==0){
if(rq.day<28)
printf("%d年%d月%d日\n",rq.year,rq.month,rq.day+1);
else
printf("%d年%d月%d日\n",rq.year,rq.month+1,1);
}
else {
if(rq.day<29)
printf("%d年%d月%d日\n",rq.year,rq.month,rq.day+1);
else
printf("%d年%d月%d日\n",rq.year,rq.month+1,1);
}
}break;
}
}
int nian(struct riqi p){
int flag=0;
if((p.year%4==0) && (p.year%100!=0) || (p.year%400==0))
flag=1;
return flag;
}
c 语言编译是什么意思,我有个C语言编译程序,但是不知道是什么意思,望大家解释哈,在下...相关推荐
- 二级c语言编译完程序如何运行,计算机二级C语言辅导:C++环境下编译和运行c语言...
一 单个文件运行 1 打开vc++出现如图 2 从file菜单中选择"new"→c++source file如图 3 单击"--"命令按扭,在choose di ...
- c语言编译面板上总有个0,C语言编程中常见问题.doc
C语言编程中常见问题 为什么vc6打开的文件却不能编译1 为什么一个vc6工程中有两个main函数不能编译成功?我想写两个程序怎么办?2 为什么v6不能编译程序,生成信息说compile和link都正 ...
- c语言编译运行程序,用visual c++ 运行C语言程序的过程
用visual c++ 运行C语言程序的过程 下面是用visual c++ 运行C语言程序的过程的详细步骤及操作教程,欢迎参考学习! 一:点击File-new(新建)出现如下对话框 在该对话框中选择第 ...
- c语言编译找不到函数的原型,C语言入门教程-函数原型
函数原型 现在,把程序中的所有函数声明函数原型已成为公认的良好编程风格.函数原型在真正定义函数之前,向后面的代码声明了函数的名称.参数和返回值的类型.为了理解函数原型的用处,请录入下面的程序并运行: ...
- 用c语言编译频率求波长,第2章 C语言基础知识.doc
第二章 C语言基础知识 2.1 常量和变量 [学习目标] 掌握常用标识符的命名规则 掌握常量和变量的定义与引用方法 实例5 常量和变量--输出常量与变量的值 [实例任务] 定义不同类型的几个变量,然后 ...
- 计算机二级c语言编译,全国计算机等级考试教程-二级C语言.pdf
丛书序 丛 书 序 全国计算机等级考试由教育部考试中心主办,是国内影响最大,参加考试人数最多的计算机水平考试.它的 根本目的在于以考促学,这决定了它的报考门槛较低,考生不受年龄.职业.学历等背景的限制 ...
- c语言编译英语翻译器,【图片】【C语言】【windows】---在线翻译器【erbi_lucifer吧】_百度贴吧...
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 #include"Translation.h" char S_Language[20]={0},T_Language[20]={0}; ...
- GCC 使用-C语言编译过程
任何一种高级语言,要想在机器上执行,必须翻译为机器能读懂的机器语言.编译器就相当于翻译官,将高级语言翻译为机器语言. GCC 最初只用了编译 C 语言程序,全称是 GNU C Compiler.后来扩 ...
- C语言1066字符类型统计,C语言编译过程及数据类型
写在前面 C语言可以称得上是高级语言中的低级语言,接下来一段时间,我会写一下文章关于c语言,把它的神秘面纱一 一揭开.下面主要是c语言的C语言编译过程及数据类型 源文件编译过程 为了使计算机能执行高级 ...
最新文章
- 工具 | 四元数长什么样?这个小工具将旋转量可视化+相互转换,效果直观!
- Centos7 防火墙 firewalld 实用操作
- wuhan2020:武汉新型冠状病毒防疫开源信息收集平台
- 推荐系统User-Item Embedding图算法
- 我看中国软件---问题篇
- 什么是交互设计?交互设计是用来干什么的?
- c语言基于easyX樱花特效,C++基于easyx图形库实现推箱子游戏
- HTML5新表单新功能解析
- 神经网络如何利用C语言实现动画?
- 《数据库原理与应用》作业(1-0.5)
- 如何在线压缩图片?图片太大了如何改小kb?
- STM32 CubeIDE 断点失效的解决方法
- python 面向对象理解_怎么理解面向对象?
- 设置火狐浏览器背景图图片素材
- 前端验证码倒计时、后台发送验证码、创蓝短信接口
- Linux时间同步的几种方式
- 用vb编写websocket客户端示例(每秒百万弹幕吞吐量)
- 号外! 中国移动开始养猪了!
- h5可拖动悬浮按钮_手机端H5悬浮按钮怎么实现的呢?
- Linux Job Control机制