Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Travelling
- {
- class Program
- {
- static void Main(string[] args)
- {
- string distinacion = Console.ReadLine();
- while (distinacion != "End")
- {
- double needMoney = double.Parse(Console.ReadLine());
- double saveMoney = 0;
- while (saveMoney < needMoney)
- {
- double inputMoney = double.Parse(Console.ReadLine());
- saveMoney += inputMoney;
- }
- Console.WriteLine($"Going to {distinacion}!");
- distinacion = Console.ReadLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement