0

Can you tell me how to convert int to bool, please

https://code.sololearn.com/cfisNS368l5d/?ref=app

10th May 2020, 7:19 PM
E.Q
E.Q - avatar
5 ответов
+ 3
E.Q Why you want to convert int to bool because bool contains only 2 value true or false. So when you will convert 0 to bool it will give false other than 0 you will always get true. Convert.ToBoolean() gives output in bool but you have assigned to int which is wrong. int nota = Convert.ToBoolean(nota); should be bool notaa = Convert.ToBoolean(nota);
10th May 2020, 8:07 PM
A͢J
A͢J - avatar
+ 2
E.Q Then why you want to convert number in bool?
10th May 2020, 8:16 PM
A͢J
A͢J - avatar
0
I want to count negative (x <10) and positive (x> 10) values
10th May 2020, 8:13 PM
E.Q
E.Q - avatar
0
AJ #Infinity Love Bool does not serve to make counts, besides true and false
10th May 2020, 8:20 PM
E.Q
E.Q - avatar