// Sample Solution
using System;
namespace SwitchStatement
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Pick a movie genre: (Drama, Comedy, Adventure, Horror, Science Fiction)");
string genre = Console.ReadLine();
switch(genre)
{
case "Drama":
Console.WriteLine("Citizen Kane");
break;
case "Comedy":
Console.WriteLine("Duck Soup");
break;
case "Adventure":
Console.WriteLine("King Kong");
break;
case "Horror":
Console.WriteLine("Psycho");
break;
case "Science Fiction":
Console.WriteLine("2001: A Space Odyssey");
break;
default:
Console.WriteLine("No movie found");
break;
}
}
}
}
No comments:
Post a Comment