সোমবার, ৭ মার্চ, ২০১৬

Compare is tow string is same? solve by c++

#include <iostream>
#include <string>
using namespace std;

int main ()
{
  string str1 ("green apple");
  string str2 ("red apple");
  cin >> str1 >> str2;

  if (str1.compare(str2) != 0)
    cout << "No" << endl;
   else
    cout << "Yes" << endl;
  return 0;
}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন