Limka Book of Recodrs

#include <iostream>
using namespace std;
class Welcomemsg
{
  public:
  int msg(char fstname[100])
  {
   cout<<"Hi "<<fstname<<endl;
   return 0;
  }
  int msg(char fstname[100],char lstname[100])
  {
    cout<<"Welcome "<<fstname<<" "<<lstname<<endl;
    return 0;
  }
};
int main()
{
Welcomemsg ob;
    char n1[100], n2[100], n3[100];
    cin>>n1>>n2>>n3;
    ob.msg(n1);
    ob.msg(n2,n3);
return 0;
}

21 comments:

  1. test case 7 and 8 ravatle bhayya

    ReplyDelete
  2. char msg(char fstname[100])
    {
    cout<<"Hi "<<fstname<<endl;
    return 0;
    }
    char msg(char fstname[100],char lstname[100])
    {
    cout<<"Welcome "<<fstname<<" "<<lstname<<endl;
    return 0;
    }

    ReplyDelete
  3. #include
    using namespace std;
    class Welcomemsg
    {
    public:
    char msg(char fstname[100])
    {
    cout<<"Hi "<>first_name1>>first_name2>>last_name2;
    ob.msg(first_name1);
    ob.msg(first_name2,last_name2);
    return 0;
    }

    // works 100%

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  5. This comments system is retarded, keeps cutting off my code:
    First half

    #include
    using namespace std;
    class Welcomemsg
    {
    public:
    char msg(char fstname[100])
    {
    cout<<"Hi "<<fstname<<endl;
    return 0;
    }
    char msg(char fstname[100],char lstname[100])
    {
    cout<<"Welcome "<<fstname<<" "<<lstname<<endl;
    return 0;
    }
    };

    ReplyDelete
    Replies
    1. Second half

      int main()
      {
      Welcomemsg ob;
      char first_name1[100], first_name2[100], last_name2[100];
      cin>>first_name1>>first_name2>>last_name2;
      ob.msg(first_name1);
      ob.msg(first_name2,last_name2);
      return 0;
      }

      This works for sure, shoutout to the semi correct code snippets above

      Delete
  6. pls update its not working 100%

    ReplyDelete
  7. Working Program. 100%!
    #include
    using namespace std;
    class Welcomemsg
    {
    public:
    char msg(char fstname[100])
    {
    cout<<"Hi "<>first_name1>>first_name2>>last_name2;
    ob.msg(first_name1);
    ob.msg(first_name2,last_name2);
    return 0;
    }

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete