1 #include 2 int main() 3 { 4 int a,b; 5
while(scanf("%d %d",&a,&b)){ 6 if(a==0&&b==0)return 0; 7 else
printf("%d\n",a+b); 8...
分类:
其他好文 时间:
2014-06-10 12:04:06
阅读次数:
180
1 #include 2 int main() 3 { 4 int i,T,a,b; 5
scanf("%d",&T); 6 for(i=0;i<T;i++){ 7 scanf("%d %d",&a,&b); 8
printf("%d\n"...
分类:
其他好文 时间:
2014-06-10 12:02:51
阅读次数:
153
echo
printfprintf命令模仿C程序库(library)里的printf()库程序(library
routine)。它几乎复制了该函数的所有功能。不过在Shell层级的版本上,会有些差异。由于printf的行为是由POSIX标准所定义,因此使用printf的脚本比使用echo移植性好。...
分类:
其他好文 时间:
2014-06-10 10:15:40
阅读次数:
241
6、用双循环打印n行如下图形。 * *** ***** ******* 6 7 8 #include
9 int main() 10 { 11 int i=0,j=0,n=0; 12 13 printf("plz input n\n"); ...
分类:
其他好文 时间:
2014-06-10 09:33:09
阅读次数:
206
在了解回调函数之前,你应该先去了解函数指针!!!
先看一个回调函数的例子:
#include
#include
void Call(void (*fp)(int) ,int x) //Call为调用者,fp为指向回调函数的函数指针
{
fp(x);
}
void CallBackFun1(int x) //CallBackFun1为回调函数
{
printf("回调函数Ca...
分类:
其他好文 时间:
2014-06-10 06:48:19
阅读次数:
171
UML课程作业要求绘制十种UML图,选择Enterprise Architecture作为绘图工具,每次绘制图都要上网找教程,感觉十分麻烦,而且有些图没有找到具体教程,靠自己摸索找到了绘制方法,现在总结一下使用Enterprise Architecture如何绘制这十种图,方便大家使用。
首先这十种图分别是:
概念类图,活动图,状态机图,用例图,顺序图,通讯图,设计类图,包图,组件图,部署图。...
分类:
其他好文 时间:
2014-06-09 23:35:04
阅读次数:
260
π計算Pi的公式计算Pi的C程序:int
a=10000,b,c=2800,d,e,f[2801],g; main() {for(;b-c;) f[b++]=a/5;for(;d=0,g=c*2;c
-=14,printf("%.4d",e+d/a),e=d%a) for(b=c; d...
分类:
其他好文 时间:
2014-06-09 21:33:15
阅读次数:
202
我的第一个程序!1 #include2 int main()3 {4 printf("Hello
World!\n");5 return 0;6 }
分类:
其他好文 时间:
2014-06-09 14:40:41
阅读次数:
138
#include #include double n,p;int t; int main(){
while(~scanf("%lf%lf",&n,&p)) { t=int (pow(p,1/n) + 0.5);
printf("%d\n",t); } return ...
分类:
其他好文 时间:
2014-06-09 13:54:21
阅读次数:
209
计算机中输入输出IO是计算机中除CPU外最为重要的知识。CPU +
I(输入)/O(输出)网络上:通信-双工,半双工,单工通信可以比较好的理解IO(同步和非同步),卫星信道的复用-频率不一样。也是状态机的模型:输入端(采集数据I)--CPU(中央处理器-主要是调度,中断)--输出端(显示数据)类型:...
分类:
编程语言 时间:
2014-06-08 22:55:33
阅读次数:
333