Home Uncategorized Get Biggest Among Three Numbers in C Languages

Get Biggest Among Three Numbers in C Languages

SHARE


Here we written code for to demonstrate “nested if”.

For improvement of your coding skills we give some tasks along this. If you solve this tasks and send to our email
(onlineexamshubteam@gmail.com) with your details. we will display your details(like Name, City, college, photo) in our site.

Task : i) Write a c program to find biggest number among three numbers using else if.
ii) Write a c program to find smallest number among three numbers using nested if.

Write a C Program to demonstrate “nested if” (or)
Write a C Program to find Biggest among three numbers.

#include<stdio.h>
int main()
{
   int a,b,c;
   printf(“Enter three values :\n”);
   scanf(“%d%d%d”,&a,&b,&c);
   if(a<b)
   {
      if(b<c)
         printf(“%d is the biggest among three\n”,b);
      else
         printf(“%d is the biggest among three\n”,c);
   }
   else if(a<c)
      printf(“%d is the biggest among three\n”,c);
   else
      printf(“%d is the biggest among three\n”,a);
   return 0;
}

Output:
Enter three values :
53 175 6

175 is the biggest among three

Back to the programs list.
Task Achievers

Till now no one is answered.