Biggest of 3 numbers using Nested-If Block

This “Biggest of 3 numbers” program explains how to write logic to find the biggest value among 3 given input values using nested-if block using C programming language syntax.


  • Defining If-block inside another If-block is called nested if.
  • Using nested-if blocks, we can set dependencies of conditions.
  • for example if outer block condition is true then only it checks inner block condition

#include<stdio.h>
void main()
{
int a,b,c;
printf(“Enter 3 integers : “);
scanf(“%d%d%d”, &a , &b , &c);
if(a>b)
{
if(a>c)
printf(“a is big”);
else
printf(“c is big”);
}
else
if(b>c)
printf(“b is big”);
else
printf(“c is big”);
}


FlowChart:

Biggest of 3 Numbers Flow chart

Biggest Of 3 Numbers Using C Syntax

Share this