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

C# program to check Operators | Operators Program in C# - welcome to our blog Techno Live, now we will discuss information about the C# program to check Operators | Operators Program in C#, our admins on this blog has been around to collect information you are looking for so that we usakan to display complete information for you, and in this blog, you can also search for other information, ok please continue reading may be easily understood:

This is about : C# program to check Operators | Operators Program in C#
And this article : C# program to check Operators | Operators Program in C#
Article Csharp, Article programming, Article programs,

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 C# program to check Operators | Operators Program in C# finished we discussed

A few of our information about the C# program to check Operators | Operators Program in C#, I hope you can exploit carefully

No've You've finished reading an article on C# program to check Operators | Operators Program in C# and many articles about modern home in our blog this, please read it. and url link of this article is http://liveeconcerts.blogspot.com/2013/12/c-program-to-check-operators-operators.html Hopefully discussion articles on provide more knowledge about the world of tech gadgets.

Tag : , , ,

0 Response to "C# program to check Operators | Operators Program in C#"

Post a Comment