fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. template <class k> bool compare (k &a , k &b){
  6. return a==b;
  7. }
  8. int main() {
  9. // your code goes here
  10. int a = 5; int b = 6 ; int c=5;
  11. cout<<compare(a,b)<<endl<<compare(a,c)<<endl;
  12. string A = "hello" ; string B = "hello" ; string C = "baby";
  13. cout<<compare(A,B)<<endl<<compare(B,C)<<endl;
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
0
1
1
0