#include <iostream>
using namespace std;
int main()
{
int a;
char b;
std:: cout << "please input :"<<std:: endl;
cin >> a >> b;
std::cout << "the out put:" << std::endl;
cout << a << ' ' << b << '\n' << endl;
return 0;
}
?黄色框:先输入10,[回车]/空格输入字符
?如果不用"using namespace std;",则需要在cout和endl 前面加上"std::":
#include <iostream>
//using namespace std;
int main()
{
int a;
char b;
std:: cout << "please input :"<<std:: endl;
std:: cin >> a >> b;
std::cout << "the out put:" << std::endl;
std::cout << a << ' ' << b << '\n'<<std:: endl;
return 0;
}
endl为换行的作用,