Take two inputs length and breadth from user and check whether it is square or rectangle

PHOTO EMBED

Fri Feb 10 2023 06:57:04 GMT+0000 (Coordinated Universal Time)

Saved by @itachi #c++

#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;
    }
content_copyCOPY