so basically I wrote this code to print the greater number but it is not working.I am new to C and this confuses me a lot
#include <stdio.h> 
int greater(int a, int b); 
int main() 
{ 
int a,b,x;
printf("\n Enter two numbers:"); 
scanf("%d %d ",&a, &b); 
x=greater(a, b); 
printf("\n The greatest number is:%d", x); 
return 0;
} 
int greater(int x, int y) 
{  int great;
    if(x>y){
        great=x;
    }
    else 
    {
        great=y;
    }
    return great;
    
}```
 
    