• Home
  • Blog
  • UD Write IO Solution Import System Program

UD Write IO Solution Import System Program

0 comments

I’m stuck on a Computer Science question and need an explanation.

module Solution where

import System.IO

{- Write an IO program that reads in three integers (negative integers

– too) and prints out the largest of them. This behavior is repeated

– until the first new number read is 0. The program then immediately

– terminates (not even reading a new second or third number) after

– printing a count of completed iterations (that is the count of

– maximums printed).

– You can add additional information to both the output of the

– maximum/comparison results as well as the final output. Moreover,

– you might want to add additional outputs to indicate throughout

– what the user has to do next.

-}

main :: IO ()

main = do hSetBuffering stdout NoBuffering

undefined

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}