Friday, March 7, 2014

WRITE A FUNCTION WHICH ACCEPTS TWO INTEGERS AND DETERMINE THE LARGEST VALUE WHICH IS THEN DISPLAYED IN FUNCTION ITSELF

#include<conio.h>
#include<stdio.h>
void main()
{
void min_max(int,int);
int a,b;
clrscr();
printf("enter two nos\n");
scanf("%d%d",&a,&b);
min_max(a,b);
getch();
}

void min_max(int a,int b)
{
if(a>b)
printf("a= %d is grater than b= %d",a,b);
else
printf("b= %d is grater than a= %d",b,a);
}

No comments:

Post a Comment