#include <iostream>
using namespace std;
class number
{
    int num;
    public:
    void getdata();
    void check();
};
void number::getdata()
{
    cout<<"\n Enter a number : ";
    cin>>num;
    cout<<num;
}
void number:: check()
{
    if(num>0)
    cout<<"\n positive number";
    else if(num<0)
    cout<<"\n Negative number";
    else
    cout<<"\n zero is neutral";
}
int main()
{
    number n;
    n.getdata();
    n.check();
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: