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;}
变量是什么?变量就是可以储存值的量,分为局部变量和全局变量,等用到了再说!变量有什么类型?1、int类型 整数类型,只能用来保存整数2、long类型 长整数类型,只能用来保存整数,但是保存的数的范围更多3、float类型 浮点数类型,绝大多数,带小数的4、double类型 双精度浮点数类型,绝大多数...
/*C风格字符串的声明和使用 #include<cstdio.h> int main() { char x[]={'H','e','l','l','o','&...