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 Task1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Введите начальный вес");
- double mass = double.Parse(Console.ReadLine());
- Console.WriteLine("Введите желаемый вес");
- double recomend_mass = double.Parse(Console.ReadLine());
- double mass_lost_on_day = 1 / 100.0;
- int day = 0;
- while(mass > recomend_mass)
- {
- day++;
- mass -= mass * mass_lost_on_day;
- }
- Console.WriteLine($"День: {day} Получившееся масса: {mass}");
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement