Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace AnimalType
- {
- class Program
- {
- static void Main(string[] args)
- {
- string animal = (Console.ReadLine());
- switch (animal)
- {
- case 1:
- animal = "dog";
- Console.WriteLine("mammal");
- break;
- case 2:
- animal = "crocodile";
- Console.WriteLine("reptile");
- break;
- case 3:
- animal = "tortoise";
- Console.WriteLine("reptile");
- break;
- case 4:
- animal = "snake";
- Console.WriteLine("reptile");
- break;
- }
- if (animal != "dog" && animal != "crocodile" && animal != "tortoise" && animal != "snake")
- { Console.WriteLine("unknown"); }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment