摘要: #include <stdio.h> #include <stdlib.h> int main() { FILE *fin, *fout; // 定义文件类型指针 int ch; fin = fopen("file1.txt", "r"); // 以只读文本方式打开文件file1.txt if (f 阅读全文
posted @ 2019-12-29 13:13 海鸥与羽 阅读(86) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> const int N=5; typedef struct student { long no; char name[20]; int score; }STU; void input(STU s[], int n); in 阅读全文
posted @ 2019-12-22 15:16 海鸥与羽 阅读(180) 评论(2) 推荐(0)
摘要: 1 阅读全文
posted @ 2019-12-22 15:13 海鸥与羽 阅读(56) 评论(0) 推荐(0)
摘要: // Õâ¸ö³ÌÐòÓÃÓÚ¹Û²ìÊý×éÖеÄÒ»×éÊý¾ÝÔªËØÔÚÄÚ´æÖÐÊÇ·ñÊ 阅读全文
posted @ 2019-12-16 11:13 海鸥与羽 阅读(205) 评论(1) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #define N 1000 int fun(int n,int m,int bb[N]) { int i,j,k=0,flag; for(j=n;j<=m;j++) { flag=1; for(i=2;i<j;i++) 阅读全文
posted @ 2019-12-01 12:18 海鸥与羽 阅读(101) 评论(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 22:17 海鸥与羽 阅读(81) 评论(1) 推荐(0)
摘要: #include int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, world!"; // 定义一个数组a,数组中连续存放了字符串常量hello,world! int y=3, z=4; printf("%d... 阅读全文
posted @ 2019-11-04 11:16 海鸥与羽 阅读(96) 评论(3) 推荐(0)
摘要: //自加、自减运算 #include<stdio.h> int main() { int a=6,b=9; printf("a++=%d\n",a++); printf("a=%d\n",a); printf("++b=%d\n",++b); printf("b=%d\n",b); return 0; } //整数相除 #include<stdio.h> int main() { int a=11 阅读全文
posted @ 2019-10-20 21:54 海鸥与羽 阅读(139) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示