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