Write a program to cheak the Given number is Odd or
Even
Answers
Answered by
8
import java.util.Scanner;
public class Main {
public static void main(String [] args) {
Scanner sc = new scanner(System.in);
int usin = sc.nextInt();
if (usin % 2 == 0) {
System.out.println("The given number is even.");
}
else {
System.out.printlhn("The given number is odd.");
}
}
}
#include <iostream>
using namespace std;
int main() {
int usin;
cin >> usin;
if (usin % 2 == 0) {
cout << "The given number is even.";
}
else {
cout << "The given number is odd.";
}
return 0;
}
usin = int(input())
if usin % 2 == 0:
print("The given number is even.")
else:
print("The given number is odd.")
Hope it helps..♪
Similar questions