正在加载图片...
5 #include <iostream. h> void swap(int, int) void maino f int a=2, b swap(a, b) cout<< a=k<<a<<b=w<<k<<endl void swap(int x, int y) 输出结果为: i int t; a=2,b=5 C++程序设计课件设计制作:徐龙琴 8C++程序设计课件 设计制作:徐龙琴 8 #include <iostream.h> void swap(int,int); void main() { int a=2,b=5; swap(a,b); cout<<"a="<<a<<",b="<<b<<endl; } void swap(int x,int y) { int t; t=x;x=y;y=t; } 输出结果为: a=2,b=5 ⒌
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有