10. Invalid Number (Using Bool)
Ivan Ivanov
Posted on January 20, 2023
using System;
namespace InvalidNumber
{
class Program
{
static void Main(string[] args)
{
int num = int.Parse(Console.ReadLine());
bool isValid = (num >= 100 && num <= 200) || num == 0;
if (!isValid)
{
Console.WriteLine("invalid");
}
}
}
}
💖 💪 🙅 🚩
Ivan Ivanov
Posted on January 20, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.