首页 > 电脑
更新时间2019-12-25 04:36:01
#include”stdio.h”main( ){ int a=1,b=2,c=2,t=0; while (a<b) { t=a; a=b; b=t; c++; } printf( “%d,%d,%d ”,a,b,c ) ; }程序的运行结果是
结果为
2,1,3
a和b数据交换,c是加1
上一篇:安妮·博林说什么语言
下一篇:c语言中如何用调用函数将字符数组中的内容接到字符串的后面