Programs in C

Monday, 17 August 2015

Find greatest of 3 number using conditional operator

#include<stdio.h>
#include<conio.h>
int main()
{
 int n1,n2,n3;
 prinft("Enter Numbers n1, n2, n3 : ");
 scanf("%d"%d%d",n1,n2,n3);
 printf("Greatest=%d",n1>n2?n1>n3?x:z:y>z?y:z);
 getch();
 return 0;
}
Posted by Unknown at 09:14
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2015 (16)
    • ▼  August (16)
      • Program to find roots of quadratic equation using ...
      • To perform Arithmetic Operations Using Switch case
      • To find fibonacci series
      • To find factorial of number
      • To find Sum of square program
      • To find the sum and average of n elements given by...
      • To Check Whether a Number is Positive or Negative
      • To check given number is even or odd
      • To find Largest of Two Numbers using Conditional O...
      • Find greatest of 3 number using conditional operator
      • To find greatest number from two numbers using if ...
      • To find the largest of three numbers using if else
      • To Check given number is Prime Number or Not
      • Print prime number from 0 to n number
      • Convert Celsius to Fahrenheit
      • Convert Fahrenheit to Celsius

Popular Posts

Simple theme. Powered by Blogger.