• Advertisement
Sign in to follow this  

T__T please help on scheme

This topic is 4153 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am new to scheme, and are learning it using Dr.Scheme, please help I came across this question, but have some trouble with it: A clock structure (define-struct Clock(hours minutes seconds)). Make a function that Consume a Clock structure and output the total seconds ;;this is what i did (define-struct Clock (hours minutes seconds)) (define Clock1(make-Clock 10 10 10)) (define (ChangeIntoSec ClockX) (+ (+ (* (Clock-hours Clock1) 3600) (* (Clock-minutes Clock1) 60)) (Clock-seconds Clock1))) ;;end did I do it right? because is the user suppose to type in the hours, minutes and seconds themself in the interactive window? In my answer I made a clock myself, instead of asking the user to type in the time for the clock structure please help thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement