Explaining the structure of my code in TripleX so far!

#include // Preprocessor - Directive : Derives the code library.

int main() //Main Function : This Function executes our program. In my case I am printing some lines in the terminal and the sum of 3 integers.

{

std ::cout <<"Welcome to the Reserve Bank Terminal.";

std ::cout <<std::endl;               // Expression Statements : All the code ending with ':' is known as expression statements.

std ::cout <<"Solve the Security Puzzle.";

std ::cout <<std::endl;

const int a = 3;

const int b = 5; // Declaration Statements : These are the statements where we declare something. In this case we are declaring a bunch of variables.

const int c = 6;

int sum = a + b + c;

std::cout <<sum <<std::endl;

return 0; // Return Statement : This Tells the program to end this section of code. It has '0', which tells us that the program has successfully finished its function.

}

Blockquote

1 Like

Privacy & Terms