Skip to main content

Posts

Showing posts with the label else

Decision Making in C

DECISION MAKING IN C When we need to execute a problem in  accordance to the condition, in a  program, or to check any valid argument in a program, we need a favorable method to execute the program, this is where Decision Making steps in programming. Think of a ROUNDABOUT where, on left lane is your home, on right is your friend's home ,forward is market, and back is hospital, you need to decide on which lane/road you need to move, hence you execute your passage through that lane to reach  your destination, decision making works in same way where you get to decide what to do according to desired condition. For example in real world: if you need to go to hospital from roundabout  you need to take U-Turn and go thus you make a decision, since you decided to go to hospital, your condition is taking a U-Turn. For example in programming: if you need to print your age when '1' is pressed and or name when '2' is pressed, the condition is to press eith...