Preview:
#include<iostream>
using namespace std;
template<class t>
    class check{
        public:
        int a,b;
        void sqcheck(int a,int b){
            cout<<"Enter two values\n";
            cin>>a>>b;
            if(a==b){
                cout<<"It is square"<<endl;
            }
            else{
                cout<<"It is a rectangle\n";
            }
        }
    };

    int main(){
        check<int>c;
        int a,b;
        c.sqcheck(a,b);
        return 0;
    }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter