Type of a Sentence
For a given sentence, print its type based on the following rules:
Interrogative
sentences end with a question markExclamatory
sentences end with an exclamation mark- All other sentences are considered
Declarative
.
E.g. for the following text: I ate a snail.
the program should output Declarative
, whereas for this sentence I ate a snail!
the output should be Exclamatory