会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
刘趁趁
博客园
首页
新随笔
联系
订阅
管理
2017年11月11日
什么叫函数?
摘要: Date 11.11 河中医 什么叫函数? 1,能够接收数据{当人也可以不接收数据} 2,能够对接收的数据进行处理 3,能够将数据处理的结果返回{当然也可以不返回任何值} #include<stdio.h> int f(void) //括号中的void表示该函数不能接受数据 int表示函数返回值in
阅读全文
posted @ 2017-11-11 12:35 刘趁趁
阅读(395)
评论(0)
推荐(0)
2017年10月30日
数组
摘要: # include<stdio.h> int main(void) { int a[5]=(1, 2, 3, 4, 5); //a是数组的名字,5表示数组元素的个数,并且这5个元素分别为a[0],a[1]...a[4],从0开始算的。 int i; for(i=0;i<5;++i) printf("
阅读全文
posted @ 2017-10-30 08:53 刘趁趁
阅读(110)
评论(0)
推荐(0)
2017年10月28日
三位数的倒序
摘要: #include<stdio.h>void main(){ int a,b,c,x; printf("请输入一个三位数:"); scanf("%d",&x); a=x/100; b=x/10%10; c=x%10; x=c*100+b*10+a; printf("这三位数的倒序输出为%d",x);}
阅读全文
posted @ 2017-10-28 09:49 刘趁趁
阅读(944)
评论(0)
推荐(0)
大写字母改为小写字母。
摘要: a and A
阅读全文
posted @ 2017-10-28 09:10 刘趁趁
阅读(587)
评论(0)
推荐(0)
2017年9月10日
++i和i++的区别
摘要: 恢复内容开始 恢复内容结束
阅读全文
posted @ 2017-09-10 16:44 刘趁趁
阅读(158)
评论(0)
推荐(0)
计算求值
摘要: 恢复内容开始 恢复内容结束
阅读全文
posted @ 2017-09-10 15:43 刘趁趁
阅读(312)
评论(0)
推荐(0)
整形数据的溢出
摘要: #include ; int main() { short int a,b; a=32767; b=a+1; printf("a=%d,a+1=%d\n",a,b); return 0; } /*result: a=32767,a+1=-32768 analysis: 一个2字节的整型变量只能容纳-32768~32767范围内的数,无法表示大于3276...
阅读全文
posted @ 2017-09-10 10:00 刘趁趁
阅读(392)
评论(0)
推荐(0)
2017年9月7日
int和char类型练习
摘要: #include int main () { /*char c1,c2; c1='A';c2='a'; printf("c1=%c\tc2=%c\n",c1,c2);*/ /*-----------------------------------------------------------------------------------------------...
阅读全文
posted @ 2017-09-07 10:15 刘趁趁
阅读(184)
评论(0)
推荐(0)
两个数相加,找错误。
摘要: #include int main () { int p,x,y; scanf("%d%d",&x,&y); //error C2059: syntax error : '%' printf("The sum of x and y is:%d",p) ; // printf("The sum of x and y is:%";,p) ...
阅读全文
posted @ 2017-09-07 10:14 刘趁趁
阅读(120)
评论(0)
推荐(0)