C语言-codes skills&心得体会
爱足球的少年7777777
踢球踢球!!!!!!!!!!!
希望赚了钱,可以更加自由自在地踢球!!!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C语言-while(scanf...)...技巧 EOF含义
EOF (END OF FILE) 是用#define定义的,值为-1 scanf()函数是由返回值的,返回 输入的值的个数。 见代码 #include int main() { int a,b; while(scanf("%d%d",&a,&b)!=EOF) printf("%d\n",a+b); return 0;原创 2015-08-10 12:29:09 · 8301 阅读 · 0 评论 -
C语言计算某天是一年中的第几天(熟练使用状态位flag)
请使用switch语句和if...else语句,计算2008年8月8日这一天,是该年中的第几天。 /************************************** *author: Yang Xu *assignment: switch test ***************************************/ #include #includ原创 2015-08-01 10:28:48 · 3343 阅读 · 0 评论 -
C语言-流程图
在编写C语言程序时,习惯性的用草稿纸画流程图有助于写出高效简洁的C程序。 所以请养成这个好习惯。 平行四边形:输入输出框 菱形:判断 矩形:处理 矩形无菱角:起止框原创 2015-08-14 12:20:36 · 7281 阅读 · 0 评论 -
C语言-计算某段代码的运行时间
#include #include #include//time.h头文件 int main() { float a=3; int i, begin, end;//定义开始和结束标志位 begin=clock();//开始计时 for(i=1;i<=1000000000;i++) a+=1; end=clock();//结束计时 printf("%d\n",原创 2015-08-05 18:05:00 · 7319 阅读 · 0 评论 -
C-initialize your pointer before using
I have often countered the problem that "the variable is not initialized before using" which means that you should give the pointer an address before. for example: int* p=(int*) malloc(sizeof(in原创 2016-02-23 14:09:06 · 588 阅读 · 0 评论
分享