Write a C# Sharp program to remove all vowels from a given string
- برمجة سي شارب
- برمجة
- 2021-05-15
- MarwaMohammed
الأجوبة
using System;
using System.Text.RegularExpressions;
namespace exercises
{
class Program
{
static void Main(string[] args)
{
string text;
text = "Python";
Console.WriteLine("Orginal string: "+text);
Console.WriteLine("After removing all the vowels from the said string: " + test(text));
text = "C Sharp";
Console.WriteLine("\nOrginal string: " + text);
Console.WriteLine("After removing all the vowels from the said string: " + test(text));
text = "JavaScript";
Console.WriteLine("\nOrginal string: " + text);
Console.WriteLine("After removing all the vowels from the said string: " + test(text));
}
public static string test(string text)
{
return new Regex(@"[aeiouAEIOU]").Replace(text, "");
}
}
}
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال