Posts

Showing posts from July, 2017

if, if....else Statement in C programming

Image
        In the previous article we have seen How to Download and Install Code::Blocks and How To Create and Run Project In Code::Blocks if you did not read previous article you read it .                    The if, if....else and nested if ... else statements are used for decision purpose. In simple word you can say if this condition satisfies then execute this otherwise execute other. E.g If we entered one integer and we want to find it is even number or odd number. This decision can be made using if as well as if...else statement. if statement needs two condition as num%2==0 and num%2==1. If first condition is satisfies it returns num%2==0 statement otherwise it returns n%2==1 statement. In if .... else statement we need only one condition num%2==0. If even number is provided then it returns the first statement otherwise it returns the second statement. In the case of nested if ... else sta...