History, asked by myselfjc, 1 year ago

write about the branching in BASIC and explain it

Answers

Answered by THETIGGER
1
Branching

When an "Algorithm" makes a choice to do one of two (or more things) this is called branching. The most common programming "statement" used to branch is the "IF" statement.

The If Statement

Algorithms in Computer Programs are a lot like recipes, but most recipes don't allow the cook to make choices. If it says, mix two eggs with a cup of flour, that is exactly what you do. But some recipes do allow for variations. Such as, if cooking on the Grill outside, do one thing, if cooking in the oven inside do something else.

In a computer program, the algorithm often must choose to do one of two things depending on the "state" of the program. If the grade is greater than 90, then give the student an A, otherwise if the grade is greater than 80, give the student a B,... etc.


THETIGGER: hey
Similar questions