Program To Write A Function MAX() Value Which Receives 3 Int Values And Returns Maximum Value
/* Program To Write A Function MAX() Value Which Receives 3 Int Values And Returns Maximum Value */ #include
#include
void main() { int x,y,z,m; int max_value(int,int,int); clrscr(); printf(" enter the numbers \n"); scanf("%d%d%d",&x,&y,&z); m=max_value(x,y,z); printf(" the maximum value is %d",m); getch(); } int max_value(int x,int y,int z) { int m; if( x>y ) { if(x>z) m=x; else m=z; } else { if( y>z ) m=y; else m=z; } return(m); } getch();
Please send comments to
vgdarur.javafive@blogger.com
Copyright © 2008 - iForeRunner.com
http://www.iforerunner.com/