Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

cual es el error de este codigo

+6 votes
asked Sep 4, 2024 by maria paula gutierrez pineda (180 points)
double SalAn,SMMLV,Inc,SalNv;
    cout<<"Salario anterior: ";
    cin>>SalAn;
    cout<<"Salario legal vigente: ";
    cin>>SMMLV;
    if (SalAn 2*SMMLV)
    {
       Inc=SalAn*0.07;
    }
    else
    {
       Inc=SalAn*0.10;
    }
    SalNv=SalAn+Inc;
    cout<<"Salario nuevoes del empleado es de: ";

2 Answers

0 votes
answered Sep 5, 2024 by Peter Minarik (101,420 points)
edited Sep 6, 2024 by Peter Minarik
if (SalAn 2 * SMMLV)

You need a relation operator here: <, >, ==, <=, >=, or something else? I do not speak Spanish and you better know what your code is meant to do, so you should figure out what exactly you missed there.

e.g.:

if (SalAn < 2 * SMMLV)
0 votes
answered Sep 5, 2024 by Nilla Amalia (230 points)
pada cin>>SalAn;
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...