Hey guys please help me out on this program in C# I really don't have idea on this..plss:(?
program that would input the value of variable REPLY and then output its corresponding meaning.
REPLY -- MEANING
Y -- Yes,let's do it!
N -- No,I won't do it!
M -- Maybe I will!
S -- Sure dude!
Q -- Exit Program!
----------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Example
{
class Program
{
static void Main(string[] args)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Example
{
class Program
{
static void Main(string[] args)
{
Console.Write("REPLY: ");
char REPLY = Char.Parse(Console.ReadLine());
Console.WriteLine("REPLY -- MEANING");
switch (REPLY)
{
case 'Y':
Console.WriteLine("Yes,let's do it!");
break;
case 'N':
Console.WriteLine("No,I won't do it!");
break;
case 'M':
Console.WriteLine("Maybe I will!");
break;
case 'S':
Console.WriteLine("Sure dude!");
break;
case 'Q':
Console.WriteLine("Exit Program!");
break;
}
}
}
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C#