3 条题解

  • 0
    @ 2023-4-8 11:03:37

    #include<bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; if(x%2==0){ cout<<"y e s"<<endl; }else{ cout<<"n o"<<endl; } }

    • 0
      @ 2022-12-25 20:34:00

      #include<bits/stdc++.h> //头文件

      using namespace std;

      int main()

      {

      int n; //定义一个数

      cin>>n; //输入这个数

      if(n%2==0) //判断n这个数是否被2整除

      cout<<"y e s"; //是,输出“y e s“中间要加空格

      else

      cout<<"n o";//否则输出”n o“;

      return 0;

      }

      • 0
        @ 2022-12-9 0:58:45

        C :

        #include<stdio.h>
        int main(){
        	int x;
        	scanf("%d",&x);
        	if(x%2==0){
        		printf("%s","y e s");
        	}else{
        		printf("%s","n o");
        	}
        	return 0;
        } 
        

        C++ :

        #include<iostream>
        using namespace std;
        int main(){
        	int x;
        	cin>>x;
        	if(x%2==0){
        		cout<<"y e s"<<endl;
        	}else{
        		cout<<"n o"<<endl;
        	}
        }
        
        	
        
        

        Python :

        r = int(input())
        if r % 2 == 0 :
           print('y e s') 
        else:
            print('n o') 
        
        • 1

        信息

        ID
        69
        时间
        1000ms
        内存
        16MiB
        难度
        3
        标签
        递交数
        232
        已通过
        117
        上传者