C# program to check Operators | Operators Program in C# - is the article you are looking for, and we have it available in
Specs Phone, well now we will discuss the article entitled C# program to check Operators | Operators Program in C#, we has collected a lot of data to make this article, so we hope to convey information in a complete enough for you, all right please continue reading to completion:
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 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#, may be useful to you in finding references about the latest gadgets.
You've finished reading an article
C# program to check Operators | Operators Program in C# and many articles about Specs Phone in our blog this, please read it. and url link of this article is
https://manmaza.blogspot.com/2013/12/c-program-to-check-operators-operators.html Hopefully discussion articles on
could be useful and provide more knowledge for your life and family.
Tag :
Csharp,
programming,
programs,
0 comments:
Post a Comment