C++入门 输出Hello World
#include <iostream>using namespace std;int main(){
cout << "Hello, world!" << endl; return 0;}它等效于
#include <iostream>using namespace std;int main(){
cout << "Hello, world! \n"; return 0;}#include <iostream>using namespace std;int main(){
cout << "Hello, world!" << endl; return 0;}它等效于
#include <iostream>using namespace std;int main(){
cout << "Hello, world! \n"; return 0;}让我们一起来看这样一个一个简单的不能再简单的C++程序,int main() { return 0; } 首先什么是int main()呢,这是主函数的意思,可以说,我们的C++程序运行的就是这个i...
什么是注释?#include <iostream> int main()//我是注释 {/*我是注释*/ /*我 是 注 释 */ std::cout <&...
#include <iostream> using namespace std; int main() { if(1+1==2) { cout << "1+1=2"; }...
什么是数组呢?顾名思义,一组数,不一定是数,也可以是char类型的字符组(我自己给char类型数组起的名字)怎么创建数组呢?int 数组名[数组成员数]; int a[3];我就创建了一个叫做a的整数数组,数组中包含3个数,我应该怎么修改a数组的值呢?a[0]=1; a[1]...
#include<iostream> using namespace std; int main() { cout << "The size of int is&nb...
#include<iostream> using namespace std; int main() { int x=0; for(x=0;x<10;x++) { if(x==3) break;...