# 水果分级

begin所在行和end所在行之间缺少代码，请在下面代码的基础上完成整个程序，提交时只提交begin所在行和end所在行之间的代码。

#include <iostream>
using namespace std;

int  main()
{
int  n1=0, n2=0, n3=0, n4=0;
int  i, n, diameter;

cin>>n;     //输入橘子个数

for(i=1; i<=n; i++)
{
cin>>diameter;
//输入橘子最大横切面直径

//begin

//end

}

cout<<"1:"<<n1<<endl;
cout<<"2:"<<n2<<endl;
cout<<"3:"<<n3<<endl;
cout<<"4:"<<n4<<endl;

return 0;
}

``````10
90 88 76 85 60 65 75 68 73 84
``````

``````1:3
2:3
3:3
4:1``````

``````program p1000(Input,Output);
var
i,a,b,c,d,num,sum:integer;
begin
a := 0;
b := 0;
c := 0;
d := 0;
for i:=1 to sum do
begin
if num>=85 then
a := a+1
else if num>=75 then
b := b+1
else if num>=65 then
c := c+1
else
d := d+1;
end;
writeln('1:',a);
writeln('2:',b);
writeln('3:',c);
writeln('4:',d);
end.``````

``````
#include <iostream>
using namespace std;

int  main()
{
int  n1=0, n2=0, n3=0, n4=0;
int  i, n, diameter;

cin>>n;     //输入橘子个数

for(i=1; i<=n; i++)
{
cin>>diameter;   //输入橘子最大横切面直径

//begin

if(diameter>=85) n1++;
if(diameter<85&&diameter>=75)n2++;
if(diameter<75&&diameter>=65)n3++;
if(diameter<65)n4++;
//end

}

cout<<"1:"<<n1<<endl;
cout<<"2:"<<n2<<endl;
cout<<"3:"<<n3<<endl;
cout<<"4:"<<n4<<endl;

return 0;
}
``````