Update Program.cs

added while