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 animalType = Console.ReadLine();
- switch ("animalType")
- {
- case "dog":
- Console.WriteLine("mammal");
- break;
- case "crocodile":
- case "tortoise":
- case "snake":
- Console.WriteLine("reptile");
- break;
- case "cat":
- Console.WriteLine("unknown");
- break;
- default:
- Console.WriteLine("error");
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment