adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

C program to find largest of given three numbers using conditional operator


C program to find largest of given three numbers using conditional operator

#include<stdio.h>
#include<conio.h>
 void main()
    {
      int a,b,c,lar;
      clrscr();
      printf("Enter threee numbers:-");
      scanf("%d%d%d",&a,&b,&c);
      lar=a>b&&a>c?a:b>c?b:c;
      printf("%d is largest no.",lar);
      getch();
     }

Output:










Post a Comment

0 Comments