You are viewing a single comment's thread. Return to all comments →
Haskell:
reversePairLetters :: String -> String reversePairLetters [] = [] reversePairLetters [x] = [x] reversePairLetters (x:y:xs) = y:x:reversePairLetters xs testCases :: Int -> IO () testCases 0 = return () testCases n = do str <- getLine :: IO String putStrLn $ reversePairLetters str testCases (n-1) main :: IO () main = do x <- readLn :: IO Int testCases x
Seems like cookies are disabled on this browser, please enable them to open this website
String-o-Permute
You are viewing a single comment's thread. Return to all comments →
Haskell: