we provide information about gadget news and price information and specs samsung, huawei, Tecno Price products, Specifications, Features and more information about software from blackberry and android

Monday, December 2, 2013

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

C# program to check Operators | Operators Program in C# - Did you know that every day there is always a new technology that is created? if you want to know please refer to the blog Gadget News well now we will discuss first about C# program to check Operators | Operators Program in C# as you need now, we have compiled this article carefully, so please see to finish.

Articles : C# program to check Operators | Operators Program in C#
full Link : 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();
}




article C# program to check Operators | Operators Program in C# has been completed in the discussion

hopefully the information C# program to check Operators | Operators Program in C# that we provide can be useful for you to know the development of technology in the present

articles C# program to check Operators | Operators Program in C# we have conveyed to you, if feel this information is useful and you want to bookmark or share so that more people who know please use link https://profsmythe.blogspot.com/2013/12/c-program-to-check-operators-operators.html.

Tag : , , ,
Share on Facebook
Share on Twitter
Share on Google+

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

0 comments:

Post a Comment