#include <iostream> //Includes the iostream library, which is used for the most basic input and output. It provides facilities like cin and cout which can be used to read something from
//the keyboard and write something to the console window that pops up when you run a program.
using namespace std; //tells the compiler that this part of the program is in the standard namespace. Namespaces are like areas in your program. Inside a namespace your variables
//all need different names, but you can use 2 different variables/objects/functions with the same name if they are in different namespaces. If you are going to
//work with cin and cout, which are the simplest ways of handling input ant output, you want to be in the standard namespace.
int main () //defines a function which can evaluate to an integer, is called main and has no input parameters. Any input parameters would have been between the () A C++ program
// always starts at main().
{ //Starts the body of the function, in which the code is placed that's ran when the function is ran.
int a,b; //initializes two integer variables called a and b. These then can hold any integer between the min and the max for an integer, who's values depend on your compiler,
//but usually are -2^16 and 2^16 - 1 respectively. Just treat them like little suitcases where you can put numbers in, replacing the ones already there and you can look at
//what's inside. These variables are local, because they are defined within main. Outside of main you can't access them, just like you can't access your wireless internet
//if you're in someone else's home.
cout << "A = "; //Sends "A =" (without the ", those get removed) to the standard output, which is the console window that pops up when you run this program.
cin >> a; //Wait till the user types something into the console window and hits enter, then puts what was typed before the enter into the variable a. So if I would type 14 when this
//line comes about, the value of a is then set to 14. If I would type foo, you'd get an error, because we defined a as an integer variable and foo is not an integer.
cout << "B = "; // Does the same as the line a bit up, but instead of printing "A =" it will print "B ="
cin >> b; //Again waits till the user enters a value for b.
cout << "A + B = " << (a+b) << "\n"; //This first calculates the value of the sum of what the user put in for a and what he or she put in for b. Then first prints "A + B =", followed by
//the number it just computed, then followed by a new line ("/n" is the newline character and gets replaced with a jump to a new line). The <<'s are used to indicate that the
//different parts of the line all have to be passed to the standard output in sequence. You need this because they are not of the same type. (The first one is a string, the second
//one becomes an integer and the third one is again a string. C++ doesn't let you mix and match different types)
} //Defines the end of the main function. All code after this won't be ran when the main function is ran.