/* Copyright (c) 2001-2004 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that computes the quotient
and remainder of the division of the numerator
by the denominator. */
#include <stdio.h>
#include <stdlib.h>

int main() {
    long int number = 25;
    long int denom =  3;
    ldiv_t result;
    
    result = ldiv(number,denom);
    printf("%d is divided by %d\n",number,denom);
    printf("the quotient is %d\n",result.quot);
    printf("the remainder is %d\n",result.rem);
}
