Maximum of two Number using Relational Operator

Thursday, 8 September 2011

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter the two integer number\n");
scanf("%d%d",&a,&b);
c=a>b?a:b;
printf("Max of %d and %d is %d\n",a,b,c);
getch();
}


OUTPUT:


Enter the two integer number
4
5
max of 4 and 5 is 5













No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading