Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- main = do
- -- putStrLn("Enter the name:")
- -- x<-getLine
- -- putStrLn("Hello, " ++ x)
- -- putStrLn("How are u?")
- -- putStrLn("Enter the x:")
- -- x<-readLn
- -- putStrLn("Enter the y:")
- -- y<-readLn
- -- putStrLn("Summa = " ++ show (y+x))
- -- или return(y+x)
- putStrLn("Spisok: ")
- x<-getLine
- putStrLn(show x)
- putStrLn(show(words x))
- let y = map (\l -> read l :: Int) (words x)
- putStrLn(show y)
- let z = last y
- putStr("Last element: ")
- return (z)
- x1<-readFile "in"
- let x2 = init x1
- let y = map (\l -> read l :: Int) (words x2)
- let z = last$init y
- writeFile "out" "PreLast element:\n"
- appendFile "out" (show z)
- return (x2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement