Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _08._Animal_Type
- {
- class Program
- {
- static void Main(string[] args)
- {
- string animalName = Console.ReadLine();
- //dog -> print mammal
- //crocodile, tortoise, snake -> print reptile
- //others -> unknown
- if (animalName == "dog")
- {
- Console.WriteLine("mammal");
- }
- else if (animalName == "crocodile" || animalName == "tortoise" || animalName == "snake")
- {
- Console.WriteLine("reptile");
- }
- else
- {
- Console.WriteLine("unknown");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment