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;}
什么是注释呢?这简直是废话,就像您在读书时候做的笔记,复习的时候圈的重点,简单来说,它并不是程序的一部分,但是它可以进行解释程序的行为或者任何想加在程序里面的东西。它的格式就两种,第一种/* 我是注释 我还是注释 &nb...
#include<iostream> using namespace std; int main() { cout << "The size of int is&nb...
#include<iostream> using namespace std; int sum(int a,int b);//函数声明 int main() { cout <<&nb...
#include<iostream> using namespace std; int main() { int x=0; for(x=0;x<10;x++) { if(x==3) break;...