‹‹ 上一主题 |下一主题 ››
发新话题
打印

请教 程序解释

#inclde<iostream.h>
void main()
{
int a,b;
cout<<"Input a,b:";
cin>>a>>b;
cout<<"a="<<a<<","<<"b="<<b<<endl;
cout<<"a-b="<<a-b<<endl;
}


cin、endl是什么意思 有什么作用
一大堆"<<" 又何解
最好能吧整个程序详细解释一下
初学c++ 眩晕中 望各高手不吝赐教 谢谢

TOP

cin是输入

endl是换行

<<是输出时用

>>是输入时用
你的输出结果会是这样的:比如a=1,b=2
Input a,b:
1,2
a=1,b=2
a-b=-1

TOP

cin是输入,endl是结尾并换行

TOP

‹‹ 上一主题 | 下一主题 ››