Answer to Question #159059 in C++ for Banele

Question #159059

the expression in the if statement:

if (score =30)

grade='A'

always evaluates to true


1
Expert's answer
2021-01-30T12:50:16-0500
#include <iostream>


using namespace std;


int main()
{
    char grade;
    float score=30;
    if (score =30)
    grade='A';
    
    cout << grade;


    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog