正在加载图片...
142C++程序结构 例141 //This is a C++ program #include <iostream. h void main() i double xy cout<<"Enter two float numbers I cin double z=x+y cout<< X+y=< ndl 运行结果: Enter two float numbers: 3.4 5.5 y=8.914.2 C++程序结构 ◼ 例14.1 ◼ //This is a C++ program. ◼ #include <iostream.h> ◼ void main( ) ◼ { double x,y; ◼ cout<<"Enter two float numbers:"; ◼ cin>>x>>y; ◼ double z=x+y; ◼ cout<<"x+y="<<z<<endl; ◼ } ◼ 运行结果: ◼ Enter two float numbers:3.4 5.5 ◼ x+y=8.9
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有