C# program to check Operators | Operators Program in C# - welcome to the blog
Software Gadget the end of this much calm product information launcing, yes every day there are always products that are removed from various brands, both physical hardware products and software that need new knowledge to use it, well now we will discuss first about C# program to check Operators | Operators Program in C# as you search we have collected a lot of data to make this information as complete as possible for you, please read:
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();
}
so much information C# program to check Operators | Operators Program in C#
hopefully the information C# program to check Operators | Operators Program in C# that we provide can be useful for you in the set of technology products that fit your daily needs,
have just read the article titled C# program to check Operators | Operators Program in C# if you feel useful information and you want to bookmark or share please use the link https://ramblingsofker.blogspot.com/2013/12/c-program-to-check-operators-operators.html and do not forget to go back to this blog if you want to know information about the latest gadgets.
Tag :
Csharp,
programming,
programs,
0 komentar:
Posting Komentar