01/06/2016
Lesson 3 - Control structures : Part 1 - if and switch
Terminal command: go inside the directory of the .cpp file
type g++ vardatatypes.cpp -o lesson2.out then press enter.
after pressing enter, type ./lesson2.out. then your done.
Note: I am using space after the # because in facebook this represents for hashtag. But in your actual programming. Please don't put spaces in that part.
Source code:
# include /**header file: this is a class on a library that allows you to perform inputs and outputs. The IO on iostream means Input Output**/
using namespace std;
int main(){ //Ex*****on of your program always starts at your main
int a = 5;
//if statement
if(a == 5){
//if condition is true
cout