Posts Tagged ‘haskell’

29
Mar

haskell faktöriyel hesaplama

   Posted by: Muhammed YÜRÜRDURMAZ    in Yazılım


1 faktoriyel 0 = 1
2 faktoriyel a = a * faktoriyel (a - 1)
3 main = do putStrLn "Hangi Sayının faktöriyeli hesaplanacak ? "
4           say <- readLn
5           print (faktoriyel say)
6

Bookmark and Share
Tags: , ,

Tags: , ,

Switch to our mobile site