Maximum of two Number

Monday, 29 August 2011

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter the value of a ");
scanf("%d",&a);
printf("\nenter the value of b ");
scanf("%d",&b);
if(a>b)
  {
    printf("\na is greater");
  }
else
  {
    printf("\nb is greater");
  }
getch();
}

OUTPUT:

enter the value of a 5
enter the value of b 4
a is greater



No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading