c program to find maximun of given numbers


Program to find the Maximum of given Three Numbers, using Function
Program
#include <stdio.h>
void main()
{
void max_three(int,int,int);
int a,b,c;
printf("\nEnter any Three Integers : ");
scanf("%d%d%d", &a, &b, &c);
max_three(a, b, c);
}
void max_three(int x, int y, int z)
{
int d;
if(x > y)
d = x;
else
d = y;
if(d > z)
printf("\nMaximum of Three Numbers : %d", d);
else
printf("\nMaximum of Three Numbers : %d", z);
return;
}

No comments: