This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; P33 (*) Determine whether two positive integer numbers are coprime. | |
;; Two numbers are coprime if their greatest common divisor equals 1. | |
;; Example: | |
;; * (coprime 35 64) | |
;; T | |
#lang racket | |
(provide coprime?) | |
(define (coprime? a b) | |
(= 1 (gcd a b))) |
0 件のコメント:
コメントを投稿