Thursday, 14 June 2018

Program to find maximum of two number in C using user define function

# include <stdio.h>
int maxi ( int , int )
void main ()
{
int a,b,c ;
clrscr () ;
printf ("\n Enter value of a:") ;
scanf ("%d", & a) ;
printf ("\n Enter value of b:") ;
scanf ("%d", & b) ;
c= max (a,b) ;
printf ("\n Maximum no is %d", c) ;
getch () ;
}
int maxi (int a , int b)
{
if (a>b)
return a ;
else
return b ;
}



No comments:

Post a Comment

Featured post

Kalgudi Interview Round!!

Those who cleared the second round of kalgudi got an email from exceller to complete their Kalgudi Interview Round. So here we will discuss ...