Header Ads Widget

Write a CPP program to check whether a given number is even or odd

 Code:-

#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cout<<"enter a number\n";
cin>>n;
if(n%2==0)
cout<<"This is a even number";
else
cout<<"This is a odd number";
return 0;
}

Output:-

enter a number
12
This is a even number





Post a Comment

1 Comments

  1. The King Casino Company - Ventureberg
    It was 출장안마 born in 1934. The Company offers luxury hotels, If novcasino you don't have a poker room in your house, then you'll find a poker ventureberg.com/ room https://octcasino.com/ in the

    ReplyDelete