using System;
public class Program
{
public static void Main()
/*
16. Write a C# Sharp program to check whether an alphabet letter is a vowel or a consonant.
Test Data :
k
Expected Output :
The alphabet is a consonant.
*/
// alphabet letter is a vowel : a / e / i / o / u
Console.Write("Input an alphabet letter: ");
string letter = Console.ReadLine();
if (letter == "a" || letter == "e" || letter == "i" || letter == "o" || letter == "u")
Console.WriteLine("The Alphabet is a Vowel.");
}
else
Console.WriteLine("The Alphabet is a consonant.");
//==================================================================
17. Write a C# Sharp program to calculate profit and loss on a transaction.
500 700
You can book your profit amount : 200
int numOne , numTwo , calc ;
string amount;
Console.WriteLine("Enter the two amounts and a space between them: ");
amount = Console.ReadLine();
numOne = int.Parse(amount.Substring(0,3));
numTwo = int.Parse(amount.Substring(4,3));
calc = numTwo - numOne ;
if (numOne <= numTwo)
Console.WriteLine($"You can book your profit amount: {calc}");
Console.WriteLine($"You can book your loss amount: {calc}");
//======================================================================