

#if defined(HAVE_MAC_DIRS) || defined(__MWERKS__)

#include <LiDIA:crt.h>

#else

#include <LiDIA/crt.h>

#endif


main ()
 {
   int    i , n  ;
   bigint big, B ;
   sdigit small  ;

   crt_table T ;
   crt       C ;
   
   cout << " Bound for absolute value : " ;
   cin  >> B ;
   
   T.init ( B ) ;
   C.init ( T ) ;
   n = C.number_of_primes() ;

   cout << " " << n << " congruences needed \n\n" ;
   
   for ( i = 0 ; i < n ; i++ )
    {
      cout << " Congruence modulo "  ;
      cout <<   C.get_prime(i) << " : " ;
      cin  >>   small ;
      C.combine ( small, i ) ;
    }
   C.get_result ( big ) ;
   cout << "\n Solution : " << big << endl ;
 }
