Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string animal = Console.ReadLine();
- //1. dog -> mammal
- //2. crocodile, tortoise, snake -> reptile
- //3. others -> unknown
- if (animal == "dog")
- {
- Console.WriteLine("mammal");
- }
- else if (animal == "crocodile" || animal == "tortoise" || animal == "snake")
- {
- Console.WriteLine("reptile");
- }
- else
- {
- Console.WriteLine("unknown");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement