Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 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.  
  11. string distinacion = Console.ReadLine();
  12. while (distinacion != "End")
  13. {
  14.  
  15. double needMoney = double.Parse(Console.ReadLine());
  16. double saveMoney = 0;
  17. while (saveMoney < needMoney)
  18. {
  19.  
  20.  
  21. double inputMoney = double.Parse(Console.ReadLine());
  22. saveMoney += inputMoney;
  23. }
  24.  
  25. Console.WriteLine($"Going to {distinacion}!");
  26. distinacion = Console.ReadLine();
  27. }
  28.  
  29.  
  30. }
  31.  
  32.  
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement