-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOutput.cpp
43 lines (39 loc) · 976 Bytes
/
Output.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
//Written by: Artemis Solomom
//Welcome To C++: Output
//Output is when the program "prints" data to the console "screen".
//Example 1:
//Header File Library
#include <iostream>
//Function
int main()
{
std::cout << "Hello World!" << std::endl;
std::cout << "I am writing code!" << std::endl;
std::cout << "You can do this infinetly" << std::endl;
return 0;
}
//If you ran this program the computer would print:
//Hello World!
//I am writing code!
//You can do this infinetly
//Example 2:
//Header File Library
#include <iostream>
//Main Function
int main()
{
std::cout << "Hello World! \n";
std::cout << "Hello World! \n\n";
std::cout << "Hello World!" << std::endl;
std::cout << "Hello World!";
return 0;
}
//If you ran Example 2, the computer would print:
//Hello World!
//Hello World!
//
//Hello World!
//Hello World!
// \n creates is like hitting enter on the keyboard when you are writting.
// \n\n create a line break
// endl does the same as \n