Problem1643--[例题]Hello World

1643: [例题]Hello World

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 62  Solved: 41
[Status] [Submit] [Creator:]

Description

运行一个程序,向世界问好

Output

输出一句话,Hello World!
参考样例,注意大小写,空格,标点.

Sample Input Copy


Sample Output Copy

Hello World!

HINT

一、准备工作:
1.下载devC++
2.会安装devC++

3.打开devC++,点左上角  "文件"->"新建"->"源代码"
4.输入以下代码(复制以下代码粘贴就行):
注意:提交OJ一定要选C++提交
#include<bits/stdc++.h>
using namespace std;
int main()
{
     int a,b,c;
     cin>>a>>b>>c;
     c=a+b;
     cout<<c;
     return 0; 
}
5.点击"运行"->"编译运行",第一次需要保存,就保存到桌面吧,运行出现黑框,键盘输入1空格2,按回车,黑框自动输出3,成功了!



二、基本框架

#include<bits/stdc++.h> 
using namespace std;    
int main()  
{

    ..........
    return 0; 
}
注意:C++基本框架一定要背熟、打熟,怎么理解以后再说!!!!



三、cout语句

1.基本格式:cout<<项目1<<项目2<<…<<项目N;

2. 需要换行的位置,连接  endl;

3. 使用双引号将需要输出的具体内容包裹住
例如: cout<<"你好世界"<<123<<endl;

Source/Category