ss3434

патуване

Oct 22nd, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _5.Пътуване_2
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. double n = 0;
  15. string destinaciq = Console.ReadLine();
  16. while (destinaciq != "End")
  17. {
  18. var budget = double.Parse(Console.ReadLine());
  19. double sum = 0;
  20. for (sum = 0; sum < budget; sum += n)
  21. {
  22. n = double.Parse(Console.ReadLine());
  23. }
  24. Console.WriteLine($"Going to {destinaciq}!");
  25. destinaciq = Console.ReadLine();
  26. }
  27. }
  28. }
  29. }
Add Comment
Please, Sign In to add comment