-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHello_World.cpp
56 lines (45 loc) · 1.12 KB
/
Hello_World.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//Written by: Artemis Solomon
//Welcome to C++: Hello World
//Example 1
//Header File Library
#include <iostream>
//Function
int main()
{
//std:: indicates we are using the Standard Library.
//cout (see-out) is the Object
// << is the insertion operator
std::cout << "Hello World!";
//This ends the Function
return 0;
}
------------------------------------------------------------
//////////\\\\\\\\\\//////////\\\\\\\\\\//////////\\\\\\\\\\
------------------------------------------------------------
//This is a very, very basic program.
//Below is several examples of how the code could be written alternatively
//Example 2
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return ;
}
------------------------------------------------------------
//Example 3
#include <iostream>
#include <iomanip>
int main ()
{
std::cout << std::setw(10) << "Hello" "World!";
return 0;
}
------------------------------------------------------------
//Example 4
#include <iostream>
int main()
{
std::cout << "Hello World!" << std::endl;
return 0;
}