Here i am going to show you some basic C++ Programming... If you have any questions just ask. 

Code: Cpp
#include <cstdlib> // This must be used if you are going to be a MS-DOS Application.
#include <iostream> // This must be included in the header file if you are going to use "Cout" and "Cin"
using namespace std;
int MittSvar(int tall1, int tall2, char stykke); // Here we make an Function so is going to calculate for us.
void Manual(); // This is user Manual so is going to tell us how to use the Program.
int main(int argc, char *argv[]) // int main() is the program file.
{
// starting program. (Starting Block)
// we are defind the inputs so you are going to use so the program know how to handle them.
int tall1; // int = Integer = This will say that only input so will be accepted is integer.
int tall2; // int = Integer = This will say that only input so will be accepted is integer.
char stykke; // char = Character = This will say that only input so will be accepted is letters. ect +
// The Function void does't need any return Value.
Manual(); // Here will the User Manaul be Displayed.
system("PAUSE >nul"); // Press an Key to Continue (Hidden).
system("cls"); // Clear Screen.
cout<<"Type: "<<endl; // Prints "Type" on the screen.
cin>>tall1>>stykke>>tall2; // Exampel 13 + 13. Remember to press Enter between them.
system("cls"); // Clear Screen.
int svar = MittSvar(tall1, tall2, stykke); // Svar is the return Value of the Function.
cout<<tall1<<stykke<<tall2<<"="<<svar; // Prints: tall1+tall2=svar (Exampel 20+20=40)
system("PAUSE >nul"); // Press an Key to Continue (Hidden)
return 0; // Exit Program.
} // End Program (End Block)
int MittSvar( // Start of the Calc Function.
int tall1,
int tall2,
char stykke)
{ // (Starting Block)
int svar; // Answer of the Calc Value is going to be saved in.
// "if" command is used to true or false. IF (stykke == '+') means if the "char stykke" is + it.
// int Svar will give answer in +. Exampel (13+13=26) 13 = tall1 , + = stykke , 13 = tall2;
if (stykke == '+') svar = tall1 + tall2; // Here are we showing the Function how it should act when you put in the Values.
if (stykke == '-') svar = tall1 - tall2; // Here are we showing the Function how it should act when you put in the Values.
if (stykke == '*') svar = tall1 * tall2; // Here are we showing the Function how it should act when you put in the Values.
if (stykke == '/') svar = tall1 / tall2; // Here are we showing the Function how it should act when you put in the Values.
} // (End Block)
void Manual() //Starting Void Function.
{ // (Starting Block)
cout<<"This is a calc."; // Here is what so should be displayed in the Manual Function.
cout<<"Writing in what you want to calculate."<<endl; // Here is what so should be displayed in the Manual Function.
cout<<"Example 20 + 20 = 40. Allowed characters are "; // Here is what so should be displayed in the Manual Function.
cout<<"'+' . '-' . '/' . '*'"; // Here is what so should be displayed in the Manual Function.
} // (End Block)

