C++中的输入输出语句是什么?

2025-02-16 19:23:29
推荐回答(5个)
回答1:

c的输入输出可以沿用,即printf();和scanf();
还可以#include并using namespace std;
利用cin,cout类对象来完成。具体这样写:
比如有int i;输入i可以写成:cin >> i;
输出i可以写成:cout << i;

回答2:

c++的输出可以使用printf() ;或者cout<< ;输入可以使用scanf() ;或者cin>> ;需要头文件#include、#include或#include想输入或输出大体框架如下:

#include
using namespace std;
int main()
{
//中间可编写输入或输出的代码及其他

return 0;
}

回答3:

C++的输入是cin,输出是cout

比如:
cin>>i;
cout<

回答4:

输入是cin>>
输出是cout<<

回答5:

输出用“cout”来表示,输入用“cin”来表示。