//#include<stdio.h>是C语言库文件:基本(std)输入(i)输出(o)文件 #include<cstdio>//c++中用的,在这里也可以用 #include<iostream>//c++库文件。指输入(in)输出(out)流(stream) using namespace std;//C++语法
int main() { int a=2; float b=0.3; char c='A'; char d[100]={"Hello!"}; cout<<a<<' '<<b<<' '<<c<<' '<<d<<' '; //也可以换行,如下 cout<<a<<' '; cout<<b<<' '<<c<<' '<<d<<' '; printf("%d %f %c %s ",a,b,c,d); return 0; }