Advertisement
KrasenPenev

waking

Feb 13th, 2020
593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Wallking
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int steps = int.Parse(Console.ReadLine());
  14. int counterSteps =steps;
  15. string comand = "";
  16. int sumStep = 0;
  17.  
  18. while (comand !="Going home") // predi da sloja comand v skobite go napravih taka (steps <= 10000)
  19. {
  20. steps = int.Parse(Console.ReadLine());
  21. counterSteps += steps;
  22.  
  23. if (counterSteps>=10000)
  24. {
  25. Console.WriteLine("Goal reached! Good job!");
  26. break;
  27. }
  28.  
  29.  
  30.  
  31.  
  32. }
  33.  
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement