Tech News Today, Marshmallow Custom Rom, Huawei, Run Programs, Network, Chromebook, Bank Account

Senin, 02 Desember 2013

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

C# program to check Operators | Operators Program in C# - To all visitors of this blog, I say welcome and thank you for visiting the blog Tech News Today Look for all the things you need that are available on this blog. If not available, please leave suggestions and comments for the development of this blog. now we will discuss first about C# program to check Operators | Operators Program in C# we have collected a lot of information from sources to create this article, so 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 C# program to check Operators | Operators Program in C# has been completed in the discussion.

hopefully the article we give the title C# program to check Operators | Operators Program in C# can provide knowledge for you in living everyday life in determining the gadget that suits your needs.

you just read the article about C# program to check Operators | Operators Program in C# if this article is useful for you and want to bookmark it or share it please use the link https://sihanandi.blogspot.com/2013/12/c-program-to-check-operators-operators.html thank you and do not forget to comment if anyone.

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

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

  • C# program to print nth iteration using loopsC# program to print 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 . . . nth iterationProblem Statement:Write a program using loop which prints the following output.1 2 2 3 3 ...
  • Google Analytics for Windows PhoneUpdate (9/2/12): I have created a nuget package which makes instrumenting an app even easier. Check it out here.Last week I gave a talk on Google Analytics for Windows P ...
  • C# Program using Functions and loopsC# Program using FunctionsProgram Statement:Write a function which takes one value as parameter and display the sum of digits in the value. e.g. if user has passed 125 t ...
  • Program to print sum of factorial of Odd series in C#C# Program to print sum of factorial of Odd seriesProgram Statement:Write a program to display the sum of the following series i.e. sum of the factorial of odd series1! ...
  • HOW TO SIMULATE A BOUNCING BALL USING C++HEllo!!Bouncing ball simulation is really interesting in C++. It uses the header file <graphics.h> for drawing the ball, and here we also use http://sihanand ...

0 komentar:

Posting Komentar