#include <iostream>
using namespace std; 
class marks
{
    int m1,m2;
    public:
    marks()
    {
        cout <<"Enter the two marks : "; 
        cin>>m1>>m2;
        cout <<m1<<"\t"<<m2<<endl; 
    }
    void display ()
    {
        cout <<"marks are: "<<endl;
        cout <<m1<<endl; 
        cout <<m2;
    }
};
int main() {
    marks s; 
    s. display ();
    return 0;
}

Embed on website

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