-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
53 lines (43 loc) · 1.62 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
namespace CS_Switch_ConsoleApp
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Input the name of one of these countries and I will output the name of their currecny.");Console.WriteLine("Input the name of one of these countries and I will output the name of their currecny.");
Console.WriteLine("United States");
Console.WriteLine("Canada");
Console.WriteLine("India");
Console.WriteLine("Japan");
Console.WriteLine("Mexico");
string answer = Console.ReadLine();
CurrencyID(answer);
}
private static int CurrencyID(string answer)
{
switch (answer.ToUpper())
{
case "UNITED STATES":
Console.WriteLine("The United States uses the US Dollar.");
break;
case "CANADA":
Console.WriteLine("Canada uses the Canadian Dollar.");
break;
case "INDIA":
Console.WriteLine("India uses the Indian Rupee.");
break;
case "JAPAN":
Console.WriteLine("Japan uses the Japanese Yen.");
break;
case "MEXICO":
Console.WriteLine("Mexico uses the Mecican Peso.");
break;
default:
Console.WriteLine("I'm sorry, but I do not know what that countries currency is.");
break;
}
return 0;
}
}
}