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 Exam_Everest
- {
- class Program
- {
- static void Main(string[] args)
- {
- int mClimbed = 0;
- string stay = string.Empty;
- int daysCount = 1;
- int distance = 0;
- while ((stay = Console.ReadLine()) != "END" && distance < 3484 && daysCount <= 5)
- {
- if (stay == "Yes") daysCount++;
- mClimbed = int.Parse(Console.ReadLine());
- distance += mClimbed;
- }
- distance += 5364;
- if (distance >= 8848) Console.WriteLine($"Goal reached for {daysCount} days!");
- else Console.WriteLine($"Failed!\n{distance}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment