每天用C语言编写一个小程序,并且讲解程序中涵盖的知道点。
打开关闭文件
摘要:程序功能: 新建一个文件test.txt,并写入hello.world。 程序代码: #include <stdio.h>#include <stdlib.h> int main(){ FILE *fp = fopen("C:\\Users\\yankun\\Desktop\\蓝莲花工作室\\学习素
阅读全文
posted @
2017-03-22 18:43
蓝莲花工作室
阅读(204)
推荐(0)
求出给定范围内的所有质数
摘要:程序功能: 输入一个整数,要求打印出这个整数以内的所有质数。 程序示例: #include <stdio.h>#include <stdlib.h>#include <math.h> bool IsPrime(int x){ bool bResult = false; int i, k; k = (
阅读全文
posted @
2017-03-21 17:57
蓝莲花工作室
阅读(612)
推荐(0)
Hello,world
摘要:程序示例: #include <stdio.h> #include <stdlib.h> int main() { printf("Hello,world!\n"); system("Pause"); return 0; } 程序解析: 本程序是一个C语言实现的Hello,world!程序,虽然只有
阅读全文
posted @
2017-03-20 09:14
蓝莲花工作室
阅读(214)
推荐(0)