Hello people, welcome to yet another blog of mine and thank you for reading my previous ones.
So, in the last blog I talked about how people consider programming as something difficult even while it isn't. Well, this time its gonna be about what it looks like while programming.
While I was basically learning scratch, I found it to be a simple statement based instructions given in the scipts according to which the program works like ‘if this then that’, ‘do this, wait for… and repeat it for…’ etc. Isn't it easy to understand?
And eventually, I found the same concept in HLLs(High Level Languages) too. Who doesn't know the meaning of if-else, while, for, =, +, *, / etc. and after all, its been created by humans so its not gonna be some top-secret ‘un-understandable’ way of communication.
So, all you have to do to understand a program is to just look at the keywords, which might simply mean something obvious, check for arithmetic operators which are again obvious and frame simple sentences which would then lead to simole instructions.
Just use that little brain of yours filled with logic and try guessing what will be printed if this program is run?
Umm…that was easy, wasn't it? Hey listen, we first said that there is an integer named x having a value of 5. Then we put a condition that if x is less that 10, something will be printed(don't say that you don't know the meaning of ‘printf’, it's simple that it must be something related to print and the question itself was related to printing, and printing means printing on the screen idiot). Avoid the part that you don't understand😜, next it is written “It's less than 10” and in the else part, it is written, “It's not less than 10”. It's obvious that the ‘if(x < 10)’ part would execute because the condition satisfies and the else part would be ignored(you know why).
So, according to our guess, the output might simply be “It's less than 10”. And as I said, its been made by a human so most probably, it shoud not be something beyond average human understanding, so a simple sentence is a reasonable output.
Well, I am not going to explain any further in this blog but just look out for the next part for more of programming.
SO, TO BE CONTINUED…
Thank you for reading till the last and following me might be a good idea.