Последен тест#
#include <iostream>
using namespace std;
int main()
{
double d=0;
int i,a1,a2,a3,a4,o,pr;
cin>>o;
if(o==2) pr=60;
else if(o==3) pr=70;
else if(o==4) pr=80;
else pr=90;
cin>>a1>>a2>>a3>>a4;
d=(a1+a2+a3+a4);
for(i=0;i<=100;i++)
{
d+=i;
if(d/5>=pr)
{
cout<<i<<endl;
return 0;
}
d-=i;
}
cout<<"GRESHKA"<<endl;
return 0;
}
Add new attachment
Only authorized users are allowed to upload new attachments.
List of attachments
«
This particular version was published on 20-Aug-2015 17:35 by bedzo.
G’day (anonymous guest)
Log in
JSPWiki v2.8.3