Algorithm 3

Today we learned function if which we already learned in AO but well why not.

Single “if” a syntax that we used only to do the next action if the “if” statement true, if the statement is false it won’t continue and stop.

“if – else” syntax that used to do more that one statement, if the statement is true then it will continue to the specific action, if it’s not it will check the “else”, statement and continue with the “else” result.

Nested if syntax with bunch of if, we can put as many statement as we like with different result each.

Next is “Switch” syntax to loop certain statement forever if you didn’t put “break” command

Oh and there is also type of errors in typing command, There is “Compile Time Error”, which is a syntax error, “Link Type Error”, An Error about missing files or link to import.

“Run time error”, is about overflow, ex : 2/0

lastly “Logical Error”, it’s about wrong output when program is executed.

I think that’s all i learned today.

Leave a Reply

Your email address will not be published. Required fields are marked *