1 solutions

  • 0
    @ 2025-11-5 15:45:50

    C :

    int main(n){scanf("%d",&n);if(n&1)printf("odd\n");else printf("even\n");}
    
    

    C++ :

    #include<iostream>
    using namespace std;
    int main(){
    	int a;
    	cin>>a;
    	if(a%2) cout<<"odd\n";
    	else cout<<"even\n";
    	return 0;
    }
    

    Pascal :

    var n:integer;
    begin
      readln(n);
      if n mod 2=0 then writeln('even');
      if n mod 2<>0 then writeln('odd');
    end.
    
    • 1

    Information

    ID
    17140
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By