Write a c program to check out the maximum number(conditional operator) - CodeTextPro | Free Web Tutorial

Codetextpro Provides free Web tutorial, HTML, CSS, C, C++, Java, JavaScript, PHP, MySql, Python, Program, Programming Notes, Programming Questions and more.

Programming

Saturday, January 5, 2019

Write a c program to check out the maximum number(conditional operator)

Check out the maximum number Using Conditional Operator

#include<stdio.h>
#include<conio.h>
main()
{
int x,y,z,max;
printf("please enter the three number");
scanf("%d%d%d",&x,&y,&z);
max=x>y?x>z?x:z : y>z?y:z;
printf("the number is maximum");
getch();
}

No comments:

Post a Comment