Browse Source

Remove 0 as a choice

DricomDragon 5 years ago
parent
commit
7dd42e264f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      io_cesar.hs

+ 2 - 2
io_cesar.hs

@@ -10,10 +10,10 @@ inlinecesar n s = map (chr.(+ ord 'a').(flip mod 26).(+ n).(subtract (ord 'a')).
 
 getCorrectValue::IO Int
 getCorrectValue = do
-	putStrLn "Please give a number in [0, 26["
+	putStrLn "Please give a number in [1, 26["
 	x <- getLine
 	let i = (read x)::Int
-	if i >= 0 && i < 26 then return i else getCorrectValue
+	if i > 0 && i < 26 then return i else getCorrectValue
 
 main::IO ()
 main = do