C# program to check Operators | Operators Program in C# - the world of technology is more advanced, we should be technically literate so as not left behind by others, in blogs
Republic Gadget we will present updated information about technological developments, product reviews from various brands, now we will discuss first about this information C# program to check Operators | Operators Program in C# we cover directly from reliable sources, 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();
}
so much information C# program to check Operators | Operators Program in C#
hopefully the infromation that we show for you about C# program to check Operators | Operators Program in C# can provide the latest knowledge about the gadgets you need in everyday life.
you've just read the article with the title C# program to check Operators | Operators Program in C# if you intend to bookmark or share it for many people please use the link https://bhrepublicadominicana.blogspot.com/2013/12/c-program-to-check-operators-operators.html still a lot of information on this blog, please visit other pages.
Tag :
Csharp,
programming,
programs,
0 komentar:
Post a Comment