Write a C# Sharp program that takes a character as input and check the input (lowercase) is a vowel, a digit, or any other symbol
- برمجة سي شارب
- برمجة
- 2021-05-17
- MarwaMohammed
الأجوبة
using System;
public class Exercise9
{
public static void Main()
{
char symbol;
Console.Write("Input a symbol: ");
symbol=Convert.ToChar(Console.ReadLine());
if ((symbol == 'a') || (symbol == 'e') || (symbol == 'i') ||
(symbol == 'o') || (symbol == 'u'))
Console.WriteLine("It's a lowercase vowel.");
else if ((symbol >= '0') && (symbol <= '9'))
Console.WriteLine("It's a digit.");
else
Console.Write("It's another symbol.");
}
}
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال