Hi,
So i want to make a calculator and if the number is not decimal it should say something like please type in a decimal number or something like that.
Thats my code:
So i want to make a calculator and if the number is not decimal it should say something like please type in a decimal number or something like that.
Thats my code:
C#:
if (num1 is !decimal)
{
Console.WriteLine("Please type in a Decimal number");
}
Last edited by a moderator: