Computer Science, asked by rahulpanigrahi358, 1 month ago

Write down a program to accept a number and check if it is even or odd​

Answers

Answered by wwwalison8888a
1

writing the program using Java

class Even_Odd

{

static int n; // you need not write this line but make this a habbit cause marks are reserved for this

static void main( int n)

{ if (n%2==0)

System.out.println(" Even number");

else

System.out.println(" Odd number");

}

}

hope it helps:)

Similar questions