Haskell --- Hola maco/a! P87974


Statement
 

pdf   zip

Write a program that reads a person’s name and greets them humorously.

Input

The input is a person’s name.

Output

If the name is masculine, you should write ‘Hola maco!’. If the name is feminine, you should write ‘Hola maca!’. Assume that all names that end with A are feminine.

Observation

To solve this problem in Haskell, write a function main and choose the compiler GHC.

Public test cases
  • Input

    Albert
    

    Output

    Hola maco!
    
  • Input

    Sonia
    

    Output

    Hola maca!
    
  • Information
    Author
    Jordi Petit
    Language
    English
    Translator
    Jordi Petit
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    Haskell
    User solutions
    Haskell