Ответ:
Привет, Леха!
Не знаю, как на плюсах, а на шарпе можно попробовать так:
#region task 2
Console.WriteLine();
Console.WriteLine("Task 2");
Console.WriteLine("Please, enter number of benches, painted at 1st day?");
int benches1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(String.Concat("Ok, I got it, ", Convert.ToString(benches1), " benches painted at 1st day"));
Console.WriteLine("Please, enter percentage of benches, painted at 2nd day?");
int benches2 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(String.Concat("Ok, it is clear, ", Convert.ToString(benches2), "% of benches painted at 2nd day"));
Console.WriteLine(String.Concat("Total count of benches in the park:", Convert.ToString(func_Task2(benches1, benches2))));
double func_Task2(int _x, int _y)
{
int res;
res = _x + (_x * Convert.ToInt32(_y/100)) + 45;
return res;
}
#endregion
Объяснение:
Код примитивный, если нужны проверки - добавь сам.