Method 1:
using System;
namespace ifelse
{
internal class Program
{
static void Main(string[] args)
{
char i;
for(i='A';i<'Z'; i++)
{
if(i == 'A' || i== 'E' || i=='I' || i=='O' || i == 'U')
{
Console.WriteLine(i);
}
}
Console.ReadLine();
}
}
}
Method 2:
using System;
using System.Security.Cryptography.X509Certificates;
namespace ifelse
{
internal class Program
{
static void Main(string[] args)
{
char i;
for(i='A';i<'Z'; i++)
{
if(IsVowels(i))
{
Console.WriteLine(i);
}
}
Console.ReadLine();
}
public static bool IsVowels(char i)
{
i=char.ToUpper(i);
return i == 'A' || i == 'E' || i == 'I' || i == 'O' || i == 'U';
}
}
}