C program to find greatest between three number using Ternary operator

#include<stdio.h>
#include<conio.h>
void main()
{
  int x,y,z,a;
  clrscr();
  printf("Enter First number:- ");
  scanf("%d",&x);

    printf("Enter Second number:- ");
  scanf("%d",&y);

    printf("Enter Third number:- ");
  scanf("%d",&z);

  a=(x>y && x>z ? x:y>z ? y:z);
  printf("Greatest number is:- %d",a);

  getch();
}

OUTPUT:-

greatest between three numbers

19 comments on “C program to find greatest between three number using Ternary operator

  1. online learning

    Hello There. I found your blog using msn. This is a very well written article. I’ll be sure to bookmark it and come back to read more of your useful info. Thanks for the post. I’ll definitely comeback.

    Reply
  2. best gold to invest in

    Nice post. I was checking constantly this blog and I’m impressed! Extremely helpful information specifically the last part 🙂 I care for such information much. I was seeking this certain information for a very long time. Thank you and best of luck.

    Reply
  3. learning styles

    Hello there, You have done a fantastic job. I’ll definitely digg it and individually recommend to my friends. I’m confident they will be benefited from this website.

    Reply
  4. Hosted Landing Pages

    Hi, I do believe this is an excellent site.
    I stumbledupon it 😉 I’m going to return once again since i have book marked it.
    Money and freedom is the greatest way to change,
    may you be rich and continue to guide other people.

    Reply
  5. lords mobile hacked apk download

    I really love your site.. Excellent colors & theme.
    Did you create this website yourself? Please reply back as I’m
    attempting to create my own site and want to learn where you got this from or exactly what the theme is called.

    Thanks!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *