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;
}
Comments
Leave a comment