50 lines
685 B
C
50 lines
685 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
printf("Q: if if(-1) is true?\n");
|
||
|
if(-1)
|
||
|
{
|
||
|
printf("A: yes!\n");
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
printf("A: no!\n");
|
||
|
}
|
||
|
|
||
|
printf("Q: if if(0) is true?\n");
|
||
|
if(0)
|
||
|
{
|
||
|
printf("A: yes!\n");
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
printf("A: no!\n");
|
||
|
}
|
||
|
|
||
|
printf("Q: if if(1) is true?\n");
|
||
|
if(1)
|
||
|
{
|
||
|
printf("A: yes!\n");
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
printf("A: no!\n");
|
||
|
}
|
||
|
|
||
|
printf("Q: if if('a') is true?\n");
|
||
|
if('a')
|
||
|
{
|
||
|
printf("A: yes!\n");
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
printf("A: no!\n");
|
||
|
}
|
||
|
|
||
|
printf("Q: if if(true) is true?\n");
|
||
|
|
||
|
return 0;
|
||
|
}
|