Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Test
- {
- class Program
- {
- static void Main(string[] args)
- {
- int startDistance = 10;
- int percent;
- Console.Write("Введите процент: ");
- percent = Int32.Parse(Console.ReadLine());
- int days = 1;
- float finishDist = startDistance;
- bool tempBoolean = false;
- Console.WriteLine("День 1:\nПройдено: " + finishDist);
- while (!tempBoolean)
- {
- if(finishDist >= 200)
- {
- tempBoolean = true;
- }
- else
- {
- days++;
- Console.WriteLine("~~~~~~~~~~ ДЕНЬ " + days + " ~~~~~~~~~~");
- float k = (finishDist / 100 * percent);
- Console.WriteLine("Уже пройдено: " + finishDist);
- Console.WriteLine("Процент: " + k);
- float yet = 0;
- yet = finishDist + k;
- Console.WriteLine("За сегодня: " + yet);
- finishDist += yet;
- Console.WriteLine("Теперь сумарно прошли: " + finishDist);
- Console.WriteLine("\n\n\n\n");
- }
- }
- Console.WriteLine("Количество дней: " + days);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement