I tried to do a loop to exit if only defined values are entered with true but infinite loops are accrued. I think ı can use goto but ı don't want to do that. I am a new learner so Any help would be appreciated
using System;
class Program
{
public static void Main(string[] args)
{
Console.Write("Birinci sayınızı giriniz=>");
int s1 = Convert.ToInt16(Console.ReadLine());
Console.Write("İkinci sayınızı giriniz =>");
int s2 = Convert.ToInt16(Console.ReadLine());
Console.Write("İlk önce yapmak istediğiniz işlemi giriniz");
Console.Write("Toplama(1),Çıkarma(2),Çarpma(3),Bölme(4),Hepsi(5):");
int mn = Convert.ToInt16(Console.ReadLine());
while (true)
{
switch (mn)
{
case 1:
Toplama(s1, s2);
Console.ReadKey();
break;
case 2:
Çıkarma(s1, s2);
Console.ReadKey();
break;
case 3:
Çarpma(s1, s2);
Console.ReadKey();
break;
case 4:
Bolme(s1, s2);
Console.ReadKey();
break;
case 5:
Toplama(s1, s2);
Çıkarma(s1, s2);
Çarpma(s1, s2);
Bolme(s1, s2);
Console.ReadKey();
break;
default:
Console.WriteLine("Yanlış bir değer girdiniz.");
break;
}
}
}