Computer Science, asked by anisha379lekhwani, 23 hours ago

Write a Program in C++ to input a number and check whether that number is EVEN or ODD.​

Answers

Answered by rudhvikbathini25
1
/*
* C++ program to check if given integer is even or odd
*/
#include
using namespace std;

int main()
{
int number, remainder;

cout << "Enter the number : ";
cin >> number;
remainder = number % 2;
if (remainder == 0)
cout << number << " is an even integer " << endl;
else
cout << number << " is an odd integer " << endl;

return 0;
}

Please mark me as brianliest
Answered by itzmecutejennei
1

Explanation:

C++ Program to Check if a given Integer is Even or Odd

/*

* C++ program to check if given integer is even or odd.

#include<iostream>

using namespace std;

int main()

{

int number, remainder;

cout << "Enter the number : ";

Similar questions