Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _05._Travelling
- {
- class Program
- {
- static void Main(string[] args)
- {
- string asd = "End";
- string destination = "";
- int save = 0;
- while (true)
- {
- destination = Console.ReadLine();
- if(destination == "End")
- {
- return;
- }
- int budget = int.Parse(Console.ReadLine());
- for (int saves = 0; saves < budget; saves += save)
- {
- save = int.Parse(Console.ReadLine());
- }
- Console.WriteLine($"Going to {destination}!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement