摘要: part1 // 将file1.txt中小写字母转换成大写后,另存为file2.txt #include <stdio.h> #include <stdlib.h> int main() { FILE *fin, *fout; // 定义文件类型指针 int ch; fin = fopen("fil 阅读全文
posted @ 2020-01-01 07:34 马其顿丁丁 阅读(106) 评论(1) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h>> #include<string.h> #define N 30 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; /*学生学号 */ char nam 阅读全文
posted @ 2019-12-23 13:50 马其顿丁丁 阅读(105) 评论(1) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> const int N=3; int main() { int a[N] = {1, 2, 3}; // 定义一维数组a,包含3个整型数据,并对其初始化,3个元素初始值分别是1,2,3 int i; // 以"地址:值"的 阅读全文
posted @ 2019-12-16 23:06 马其顿丁丁 阅读(127) 评论(4) 推荐(0)
摘要: #include <math.h> #include <stdio.h> #include <stdlib.h> // 函数声明 void solve(double a, double b, double c); // 主函数 int main() { double a, b, c; printf( 阅读全文
posted @ 2019-12-02 10:47 马其顿丁丁 阅读(131) 评论(3) 推荐(0)
摘要: // 一元二次方程求解 // 重复执行, 直到按Ctrl+D或Ctrl+E结束 // #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a, b, c, x1, x2; float delta, r 阅读全文
posted @ 2019-11-18 23:15 马其顿丁丁 阅读(121) 评论(3) 推荐(0)
摘要: #include <stdio.h> int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, world!"; // 定义一个数组a,数组中连续存放了字符串常量hello,wo 阅读全文
posted @ 2019-11-05 22:09 马其顿丁丁 阅读(149) 评论(4) 推荐(0)
摘要: #include int main() { int days; printf("输入一个整数: \n"); scanf("%d",&days); if(days>=1&&days int main() { int a=5,b=8,c=8; printf("%d,%d,%d,%d\n",a==b&&a==c,a!=b&&a!=c,a>=b&&a>=c,a=c,a==b||b==... 阅读全文
posted @ 2019-10-20 22:13 马其顿丁丁 阅读(131) 评论(0) 推荐(0)