Programming again. Woo.

On Monday the programming course started and even though it’s been two years since I last used a programming language it quite easy to pick up again. Two years ago I used the language Java and there are similarities between it and C++, but I’m not complaining about that.

I went through the PDF with exercises thinking they were relatively easy until I got to Program 23. I could not quite get my head around how to do it and consulted the book. I found that it wasn’t all that bad, all I needed to do was:

int var;                            // Declaring the essential

for (var = 0; var < 8; var++)        // Start of loop with initiation, expression and incrementation
{
std::cout << var << std::endl;     // Output variable ‘var’
}
if (var == 8){                        // If statement of ‘if var being eight is true, do this shit right here below’
std::cout << “Going down.” << std::endl; // Output ‘Going down.’
for (var = 7; var >= 0; var–)    // Loop going the opposite direction of the first loop
{
std::cout << var << std::endl;    // Output variable ‘var’
}
}

Also, everytime std::cout is typed you have a sad face in the middle :c

About Alex Cully

2014  Programming