check whether given no. is greater than or equal with another no.

PHOTO EMBED

Fri Feb 10 2023 07:12:03 GMT+0000 (Coordinated Universal Time)

Saved by @itachi #c++

#include<iostream>
#include<algorithm>
using namespace std;
template<class t>
class greatest{
private:
int a,b;
public:
void check(int a,int b){
    cout<<"Enter two no.\n";
    cin>>a>>b;
    if(a>b){
        cout<<a<<" is greater than "<<b<<endl;
    }
    else if(a==b){
        cout<<a<<" is equal with "<<b<<endl;
    }
    else{
        cout<<b<<" is greater than "<<a<<endl;
    }
}
};

int main(){
    int a,b;
    greatest<int>g;
    g.check(a,b);
    return 0;
}
content_copyCOPY