Thursday, October 17, 2019

C++ program to find if a number is ODD or EVEN

Program

#include<iostream>
using namespace std;

int main()
{
    int number = 36;

    if(number % 2 == 0)
    {
        cout<<"Number is even";
    }
    else
    {
        cout<<"Number is Odd";
    }
}

Video explanation


No comments:

Post a Comment