Library functions are those functions which are defined by C library, example printf()scanf()strcat() etc. You just need to include appropriate header files to use these functions. These are already declared and defined in C libraries.

User-defined functions are those functions which are defined by the user at the time of writing program. Functions are made for code reusability and for saving time and space.

#include<stdio.h>
#include<conio.h>
void main()
{
    int a,b;
    clrscr();
    printf("Enter value of a:");
    scanf("%d",&a);
    printf("Enter value of b:");
    scanf("%d",&b);
    
    if(a>=b)
    {
        printf(" The value %d is greater than %d",a,b);
    }
    else if(b>=a)
    {
        printf(" The value %d is greater than %d",b,a);
    }
    else
    {
        printf(" The value %d is equal to %d",a,b);
    }
    getch();
}