Technology News, Micromax, Mobiles Flashing Software, Flash Tool, Pokemon GO Apk, Income Online, Moto G4 Plus, Sony PC, Latest Version, samsung note, Huawei Smartphone

Monday, December 2, 2013

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

C# program to check Operators | Operators Program in C# - technology is getting more advanced every day .. if you want to know the progress that happened please visit this blog Technology News because it will always update the latest information, now we will discuss first about C# program to check Operators | Operators Program in C# hopefully this information can answer the questions you submit to google, ok please see:

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();
}




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

hopefully information C# program to check Operators | Operators Program in C# can benefit you in getting the latest information about technology,

you just read the article entitled C# program to check Operators | Operators Program in C# if the article feel useful for you please bookmark or share by using link https://micromyaw.blogspot.com/2013/12/c-program-to-check-operators-operators.html and thank you.

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