fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. cout << "Hello.. what is your name?";
  7. string name;
  8. cin >> name;
  9.  
  10. if (name == "Marvel"){
  11. cout << " Hi.. Marvel!\n";
  12. return 0;
  13. }else{
  14. return 1;
  15. }
  16. }
Success #stdin #stdout 0.01s 5316KB
stdin
Marvel
stdout
Hello.. what is your name? Hi.. Marvel!