Advertisement
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 Wallking
- {
- class Program
- {
- static void Main(string[] args)
- {
- int steps = int.Parse(Console.ReadLine());
- int counterSteps =steps;
- string comand = "";
- int sumStep = 0;
- while (comand !="Going home") // predi da sloja comand v skobite go napravih taka (steps <= 10000)
- {
- steps = int.Parse(Console.ReadLine());
- counterSteps += steps;
- if (counterSteps>=10000)
- {
- Console.WriteLine("Goal reached! Good job!");
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement