Gadget Corner, Huawei stock ROMs, Miracle Box, How To Install, Clone Firmware, Android Latest Version, HTC Firmware Flash File, and more information about gadgets for you

C# program to check Operators | Operators Program in C#

C# program to check Operators | Operators Program in C# - Welcome to the blog Gadget Corner we provide a lot of latest gadget information that must be very loss for you to miss, now we will discuss first about C# program to check Operators | Operators Program in C# we have collected a lot of information to make this article complete for you, Ok please read::

You can also see our article on:


C# program to check Operators | Operators Program in C#

C# program to check entered value is arithmetic operator, logical operator, conditional operator, relational operator or something else

Program Statement:
Write a program using switch statement which takes one character value from user and check whether the entered value is arithmetic operator, logical operator, conditional operator, relational operator or something else.

Solution:

static void Main(string[] args)
{
char ch;
int a;
Console.WriteLine("Enter any Character:");
ch = Convert.ToChar(Console.ReadLine());
a=(int)ch;
switch (ch)
{
case '+':
case '-':
case '*':
case '/':
case '%':
Console.WriteLine("Entered Character is Arithmetic");
break;
case '&':
case '|':
case '!':
Console.WriteLine("Entered Character is Logical Operator");
break;
case '?':
case ':':
Console.WriteLine("Entered Character is Condational Operator");
break;
case '<':
case '>':
case '=':
Console.WriteLine("Entered Character is Relational Operator");
break;
default:
Console.WriteLine("Entered Character is something else not included i n list");
break;

}
Console.ReadLine();
}



Articles about C# program to check Operators | Operators Program in C# finished discussed

We think it is enough information about C# program to check Operators | Operators Program in C#, hopefully the information we give can give benefit for you,

If you feel the information C# program to check Operators | Operators Program in C# that we provide can provide benefits for others please share with link https://darellsfinancialcorner.blogspot.com/2013/12/c-program-to-check-operators-operators.html thank you for visiting our blog page and do not forget to visit other

Share on Facebook
Share on Twitter
Share on Google+

Related : C# program to check Operators | Operators Program in C#

1 komentar: