60分求助,c
查看原帖
60分求助,c
1111227
Akiraku楼主2023/9/26 13:45
#include <stdio.h>

int main()
{
	int x; 
	scanf("%d",&x);
	
	int a,b;//性质1性质2分别用ab表示,满足性质为1,否则为0 
	if (x%2==0){
		a=1;
	}else{
		a=0;
	}
	if (4<x<=12){
		b=1;
	}else{
		b=0;
	}
	
	if(a==1,b==1){
		printf("1 ");
	}else{
		printf("0 ");
	}
	
	if (a==0,b==0){
		printf("0 ");
	}else{
		printf("1 ");
	}
	
	if (a==0,b==0||a==1,b==1){
		printf("0 ");
	}else{
		printf("1 ");
	}
	
	if (a==0,b==0){
		printf("1");
	}else{
		printf("0");
	}


	return 0;
}
2023/9/26 13:45
加载中...