Pages

WRITE A Program To Find A Maximum Number Through Function

Wednesday, 17 April 2013

#include<stdio.h>
#include<conio.h>
 int max (int ,int );// function protype
int main()
{
   
    int a,b;
    scanf("%d %d",&a,&b);
    max(a,b); //function call
    printf("ok");
    getch();
}
int max (int x,int y)// function definition
{  
     if(x>y){
   printf("max is %d",x);
   }
     if(y>x){
          printf("max is %d\n",y);
     }}
      

 

Search Box

Most Reading

Contact Form

Name

Email *

Message *