可以使用bool和true、false
輸出是1或者0
1 #define _CRT_SECURE_NO_WARNINGS 2 3 #include<stdio.h> 4 #include<stdbool.h> 5 6 main() 7 { 8 bool b = 6 > 5; 9 bool t = true; 10 11 t = 2; 12 13 printf("%d\n", b);//1 14 15 system("pause"); 16 }
可以使用bool和true、false
輸出是1或者0
1 #define _CRT_SECURE_NO_WARNINGS 2 3 #include<stdio.h> 4 #include<stdbool.h> 5 6 main() 7 { 8 bool b = 6 > 5; 9 bool t = true; 10 11 t = 2; 12 13 printf("%d\n", b);//1 14 15 system("pause"); 16 }
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。