2014-10-15 2 views
-4

이것은 bool을 인쇄하는 방법입니다. 하나의 값은 true로 설정되고 하나는 false로 설정됩니다. 전에 인쇄하지 않을 이유를 모르겠습니다.C 프로그래밍 인쇄 bool

#include <stdio.h> 
#include <stdbool.h> 

int main(void) { 

    bool intersect = true; 
    bool intersect1 = false; 
    printf(" Intersection is %d \n", intersect); 
    printf(" Intersection1 is %d \n", intersect1); 
    return 0; 
} 
+0

은 * *하지 질문에 편집 한 무언가로, 코멘트에 문의하시기 바랍니다. –

+0

@Yuhao 내 게시물을 수정했습니다. – cokedude

+0

@DennisMeng 내 게시물을 수정했습니다. – cokedude

답변

0

이 그것을 수행해야합니다 당신이 속는 사람으로 폐쇄 된 이유에 대한 질문이있는 경우

printf("%s", intersect ? "true" : "false");