anizko

06. Travelling

Apr 17th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Travelling
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             string Destinacion = Console.ReadLine();
  11.  
  12.             while (Destinacion !="End")
  13.             {
  14.                 double Budget = double.Parse(Console.ReadLine());
  15.  
  16.                 double SaveMoney = 0;
  17.  
  18.                 while (Budget> SaveMoney)
  19.                 {
  20.                     SaveMoney += double.Parse(Console.ReadLine());
  21.                 }
  22.  
  23.                 Console.WriteLine($"Going to {Destinacion}!");
  24.                 Destinacion = Console.ReadLine();
  25.             }
  26.            
  27.  
  28.  
  29.  
  30.  
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment