C Program to find minimum between two numbers using if-else statement

Here is the C program in which we have to find the minimum number between two numbers using if-else statement.

void main()
{         int a,b;
           printf(“Enter two numbers:”);
           {         printf(“%d is minimum”,a);
           {         printf(“%d is minimum”,b);
The general syntax of if-else statement is :
if (condition)
{                   true statement ;
{                   false statement;
statement x;
  1. In if-else statement first condition is checked.
  2. If the condition is true then the true statement will be executed and the statement x will be executed.
  3. If the condition is false then it will execute the false statement block and then statement x.

You may also like...

Leave a Reply