Проблем
using System;
namespace _03._Histogram
{
internal class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int number;
int countp1 = 0;
int countp2 = 0;
int countp3 = 0;
int countp4 = 0;
int countp5 = 0;
for (int i = 0; i < n; i++)
{
number = int.Parse(Console.ReadLine());
if(number < 200)
{
countp1++;
}
else if (number <400)
{
countp2++;
}
else if (number < 600)
{
countp3++;
}
else if(number < 800)
{
countp4++;
}
else { countp5++;}
}
double p1;
double p2 = countp2 / n * 100;
double p3 = countp3 / n * 100;
double p4 = countp4 / n * 100;
double p5 = countp5 / n * 100;
Console.WriteLine($"{p1 = countp1 / n * 100:f2}%");
Console.WriteLine("{0:f2}%",p2);
Console.WriteLine("{0:f2}%",p3);
Console.WriteLine("{0:f2}%",p4);
Console.WriteLine("{0:f2}%",p5);
}
}
}