bonus - ; The first three lines of this file were inserted...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
;; The first three lines of this file were inserted by DrScheme. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname bonus) (read-case-sensitive #t) (teachpacks ((lib "image.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "image.ss" "teachpack" "htdp"))))) ;; Ru Wang 20319247 CS135 Sect 001 Tut 108 ; ;; Question 5: Bonus ; ;; Contract: ;; isMax-without-using-and: num num num num num -> boolean ; ;; Purpose: consumes 5 numbers and determines if the first is the largest. ; ;; Example: (isMax-without-using-and 5 4 3 2 1) => true ;; (isMax-without-using-and 4 3 2 1 5) => false ;; (isMax-without-using-and 3 2 1 5 4) => false ;; (isMax-without-using-and 2 1 5 4 3) => false ;; (isMax-without-using-and 1 5 4 3 2) => false ; ;; Definition: (define (isMax-without-using-and a b c d e) (cond [(> a b) (cond [(> a c) (cond [(> a d) (cond [(> a e)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/21/2010 for the course CS 135 taught by Professor Vasiga during the Fall '07 term at Waterloo.

Page1 / 2

bonus - ; The first three lines of this file were inserted...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online