TOPIC

erro de 5%

Leonardo Castro ferreira asked 3 months ago

include include

using namespace std;

int main() {

int X, Y;

cin >> X >> Y;

if(X == 1) {

X=4; cout << fixed << setprecision(2) << "Total: R$ " <<(double)X*Y << endl; }

else if(X == 2) {

X=4.5; cout << fixed << setprecision(2) << "Total: R$ " <<(double)X*Y << endl; } else if(X == 3) {

X=5; cout << fixed << setprecision(2) << "Total: R$ " <<(double)X*Y << endl; } else if(X == 4) {

X=2; cout << fixed << setprecision(2) << "Total: R$ " <<(double)X*Y << endl; } else if(X == 5) {

X=1.5; cout << fixed << setprecision(2) << "Total: R$ " <<(double)X*Y << endl; }

return 0; }

Remember not post solutions. Your post may be reviewed by our moderators.

  • Aléxis Toigo replied 3 months ago

    use ctrl+alt+c para postar seu código.