Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _5.Пътуване_2
- {
- class Program
- {
- static void Main(string[] args)
- {
- double n = 0;
- string destinaciq = Console.ReadLine();
- while (destinaciq != "End")
- {
- var budget = double.Parse(Console.ReadLine());
- double sum = 0;
- for (sum = 0; sum < budget; sum += n)
- {
- n = double.Parse(Console.ReadLine());
- }
- Console.WriteLine($"Going to {destinaciq}!");
- destinaciq = Console.ReadLine();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment