the expression in the if statement:
if (score =30)
grade='A'
always evaluates to true
#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?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments