2019年12月25日

实验7

摘要: ex1_1 // 将file1.txt中小写字母转换成大写后,另存为file2.txt #include <stdio.h> #include <stdlib.h> int main() { FILE *fin, *fout; // 定义文件类型指针 int ch; fin = fopen("fil 阅读全文

posted @ 2019-12-25 23:58 deepone 阅读(214) 评论(2) 推荐(0)

2019年12月18日

实验6

摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char n 阅读全文

posted @ 2019-12-18 21:59 deepone 阅读(153) 评论(1) 推荐(0)

2019年12月15日

实验5

摘要: // 这个程序用于观察数组中的一组数据元素在内存中是否是连续存放的 // 以及数组元素的直接访问与间接访问 #include <stdio.h> #include <stdlib.h> const int N=3; int main() { char a[N] ={'Y','E','S'}; // 阅读全文

posted @ 2019-12-15 22:29 deepone 阅读(149) 评论(2) 推荐(0)

2019年12月1日

实验4

摘要: #include<stdio.h> #include<stdlib.h> #include<math.h> void solve(double a,double b,double c); int main() { double a,b,c; printf("please entera,b,c:"); 阅读全文

posted @ 2019-12-01 15:52 deepone 阅读(146) 评论(2) 推荐(0)

2019年11月18日

实验3

摘要: #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int guessNumber; // 存放程序运行时生成的1~100之间的随机整数 int ans; // 存放用户猜的数字 srand((time(0))) 阅读全文

posted @ 2019-11-18 12:17 deepone 阅读(137) 评论(0) 推荐(0)

2019年11月3日

实验2

摘要: #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-03 15:22 deepone 阅读(127) 评论(2) 推荐(0)

2019年10月20日

实验1C语言开发环境使用和数据类型、运算符、表达式

摘要: //自加、自减运算 #include<stdio.h> int main() { int a=5,b=8; 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=5, 阅读全文

posted @ 2019-10-20 17:59 deepone 阅读(333) 评论(0) 推荐(0)

导航