ZIP CODE VALIDATOR in C#- Can you help me, please?
I'm trying to solve Zip Code validator in Code coach (Easy). Looks like the if and else are right but how to implement the fact there can't be any letters? As I'm no PRO, I can't see all tests. I believe there's easier way to do the code for this but this is what's on my mind. :) Thank for anyone who could help me! <3 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sololearn { class Program { static void Main(string[] args) { string num = Console.ReadLine(); int zip = Convert.ToInt32(num); if (zip >= 10000 && zip < 99999) { Console.WriteLine("true"); } else { Console.WriteLine("false"); } } } }