Computer Science, asked by annieshah5248, 3 months ago

write a program to check weather a number is prime number, even number or odd number by using function in dev c++​

Answers

Answered by pjgaikar06
1

#include <iostream>

using namespace std;

int main()

{

   int n;

   cout << "Enter an integer: ";

   cin >> n;

   if ( n % 2 == 0)

       cout << n << " is even.";

   else

       cout << n << " is odd.";

   return 0;

}

Similar questions