dimanche 28 juin 2015

I dont understand the problem in my code.. i m using codeblocks but still it is giving error "undefined reference to maxum" ...the code finds out the maximum of three numbers ..plzz help

#include<stdio.h>
int maxum(int,int,int);

int main(void)
{
int z=0;
z=maxum(1,2,3);
printf("%d",z);
return 0;
}
int maxum(int a,int b,int c)
{
if(a>>b)
   {
       if(a>>c)
        return a;
       else
        return c;
   }
else if(b>>c)
return b;
else
return c;
}

Aucun commentaire:

Enregistrer un commentaire