current position:Home>The output of C = = m is wrong, but the output of else statement is correct. Why? Is my method wrong? Or is there something wrong

The output of C = = m is wrong, but the output of else statement is correct. Why? Is my method wrong? Or is there something wrong

2022-01-26 22:47:21 CSDN Q & A

img

img


This c==m Wrong output at , but else The statement output is correct , Why is that ? Is my method wrong ? Or something wrong




Refer to the answer 1:

c == 'm'
Use single quotes




Refer to the answer 2:



Refer to the answer 3:
if( c == 'm'){}



Refer to the answer 4:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201262247184415.html

Random recommended