Guest User

Untitled

a guest
Dec 8th, 2019
173
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace travelling_05
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string destination = Console.ReadLine();
  10.  
  11. while (destination != "End")
  12. {
  13. double minBudgetNeeded = double.Parse(Console.ReadLine());
  14. double savedMoney = 0;
  15.  
  16. for (double i = minBudgetNeeded; i > savedMoney;)
  17. {
  18. savedMoney += double.Parse(Console.ReadLine());
  19. }
  20.  
  21. Console.WriteLine($"Going to {destination}!");
  22. destination = Console.ReadLine();
  23. }
  24. }
  25. }
  26. }
RAW Paste Data