0

im having this problem
when i try to add

m + 1 = k;

it says this-
*lvalue required as left operand of assignment* in my compiler, please help.
dont mind the unfinished code.

#include <iostream>

using namespace std;

int main()
{

    double b,
    m,
    k;

    string x;

    b = 0.0;
    cout << " GPA calculator " << endl;


    cout << " Is your gpa weighted? " << endl;
    cin >> x;
    while(x == "yes")
    {
        cout << " Enter point: " << endl;
        cin >> m;

    m + 1 = k;
    b += k;
     cout << " Is your gpa weighted? " << endl;
    cin >> x;


    }

    cout << b;
}
3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Mayank23
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.