I unfolded all the vendors list and company and this is all the text I got. Disturbing!.
int sum = 0; for (int i = 50; i <= 100; ++i) { sum += i; } std::cout << "The sum is: " << sum << std::endl; return 0;
int sum = 0; int balance = 0; for (int i = 50; i <= 100; ++i) { balance = sum; // balance variable befor sum+=i. Makes sense when you run the program sum += i; std::cout << balance << " + " << i << " = " << sum << std::endl; } std::cout << "The sum is: " << sum << std::endl; return 0;
int sum = 0; for(int i = -100; i <= 100; ++i) sum += i;
When writing a simple HelloWorld program it's is a step towards a higher call. A world of imagination an complicated creativity 😛
#include <iostream>
int main()
{
std::count << "Hello, World!" << std::endl;
}
I understand now that this small program could also have been written in a not so readable way
#include <iostream> int main(){std::count<<"Hello, World!"<< std::endl;}
It is not very readable for a human being to quickly make sense of the program
In a human readable program you have spaces, indentations, line shift and one of the most fundamental of programming is giving your code a visual structure and it doesn't matter which programming language your writing because you have to consider that at some point someone will read your code, copy your code, debug your code, and if you write "obviousVariableNames" you can save a lot of commenting 😆
I still feel like a beginner who is trying understand some of the most basic things like loops, variables, if/else statements, switch, function, objects, opp.. and classes what the hell is that?
Yes.. I'm still learning and will never stop learning. It's a struggle, a hard learning student who keeps on struggling until he meets gratification and satisfaction of a programming language.
With great powers comes great responsibility.. what a geek but he got a point.