wfyj.net
当前位置:首页 >> C语言编程作业 >>

C语言编程作业

#include struct time{int hour,minute,second};int main(void) {struct time tm;scanf("%d%d%d",&tm.hour,&tm.minute,&tm.second);printf("%02d:%02d:%02d\n",tm.hour,tm.minute,tm.second);return 0;}

#include #include #ifndef RedContritio #include #else #message("This is RedContritio's energy")#endif#include //用到了time函数 int jia(int a,int b) { return a+b;} char solutation[999] = "\0";int jian(int a,int b) { return a-b;}...

#include#include#define KG (n-i)#define XH (i*2+1)void main() { int i,j,n; scanf("%d",&n); for ( i=0;i

#include #include #include #include #define max 20 typedef struct student //学生 { char sno[max]; // 学号 char sname[max]; //姓名 char sex[max]; //性别 char age[max]; //年龄 char depart[max]; //系 char classs[max]; //班 char gr...

#include#include#define KG (n-i)#define XH (i*2+1)void main() { int i,j,n; scanf("%d",&n); for ( i=0;i#define KG (n-i)#define XH (i*2+1)#define SZ (i-abs(i-j)+1)void main() { int i,j,n; scanf("%d",&n); for ( i=0;i

一、首先打开VC++ 二、文件》》新建 三、创建一个C++空白文档头文件是必须声明的# include 四、说下主体思想我们定义一个求每门课平均成绩的函数AverageCourse它的形参一个是二维数组,用来传递学生成绩;一个是指针变量(数组名),存放每门课...

#include int main() { int a,b,c,d=0; scanf("%d %d",&a,&b); c=a/b; d=a%b; printf("商是:%d\n",c); printf("余数是:%d\n",d); return 0; } 运行可用,输入用空格分分开两个数 比如输入:5 3后回车 输出: 商是:1 余数是:2 C 语言属于易学难精...

#include int main(){ int sum; int i,t,c; int month[12]={31,28,31,30,31,30,31,31,30,31,30,31}; int year,mon,day; printf("Please enter the times you want to calculate(eg.2):"); scanf("%d",&t); for(c=0;c

#include int prime(int n) { /*判断素数函数*/int i;int flag = 1;for (i=2;i

我以前写的,贴给你有600行,学生管理程序 参见hi.baidu.com/mark063/blog/item/21ea0cb11e185cacd8335a60.html #include #include #include #include typedef struct stu{ char id[20]; char name[14]; int age; int year,month,day; char sex[...

网站首页 | 网站地图
All rights reserved Powered by www.wfyj.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com