C++ program to check given number is odd or even






C++ program to check given number is odd or even 


#include<stdio.h>

int main(){

    int number;
 
    cout << "Enter any integer: ";
    cin >> number;

    if(number % 2 ==0)
         cout << number << " is even number.";
    else
        cout << number <<" is odd number.";
 
    return 0;

}


Programs of c++

Algorithm:
**


1 comment:

Pavan said...

#include
#include
void main()
{
int l;
float area;
printf("\n\n\t\t length:");
scanf("%d",&l);

area=l*l;

printf("\n\n\t\tarea of square:%.3f",area);

getch();
}