
#include<iostream>
using namespace std;
int main(){
cout << "Hello,World!";
return 0;
}

#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c;
cout << b;
return 0;
}

#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int a,b,c;
cin >> a >> b >> c ;
printf("%8d%8d%8d",a,b,c);
return 0;
}
本文提供了三个使用C++编写的简单程序示例:输出“Hello, World!”、读取并显示输入的三个整数以及使用printf格式化输出三个整数。这些示例适合初学者学习C++的基本语法。
2565

被折叠的 条评论
为什么被折叠?



