TOPIC

Alguém poderia me ajudar com esse erro Wrong(10%)

Luiz Antônio Rodrigues Kronbauer asked 11 months ago

include include

using namespace std; int main() { int nc; cin>>nc; while(nc--) { string str; float gd; cin>>str; cin>>gd; float a[7],aux=0; for(int i=0;i<7;i++) { cin>>a[i]; aux=aux+a[i]; } cout<<fixed<<setprecision(2);

    aux=aux-a[0];
    aux=aux-a[6];
    aux=aux*gd;
    cout<<str<<" ";
    cout<<aux<<endl;

}

}

This topic was solved and cannot recieve new replies.

  • feodorv replied 11 months ago

    Why

    aux=aux-a[0]; aux=aux-a[6];

    Are the values a[0] and a[6] the highest and the lowest scores?

  • Luiz Antônio Rodrigues Kronbauer replied 10 months ago

    Yes. I already managed to solve the problem but thank you very much for the help