#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;
}
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;
}
this one works only 77%
ReplyDeleteTest case 7 and 8 fail
ReplyDeletetest case 7 and 8 ravatle bhayya
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
Deletethis works 100%
Deletechar msg(char fstname[100])
ReplyDelete{
cout<<"Hi "<<fstname<<endl;
return 0;
}
char msg(char fstname[100],char lstname[100])
{
cout<<"Welcome "<<fstname<<" "<<lstname<<endl;
return 0;
}
#include
ReplyDeleteusing 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%
nope
DeleteThis comment has been removed by the author.
DeleteGhantaa
ReplyDeletedoesn't work:)
DeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
DeleteThis comments system is retarded, keeps cutting off my code:
ReplyDeleteFirst 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;
}
};
Second half
Deleteint 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
pls update its not working 100%
ReplyDeleteWorking Program. 100%!
ReplyDelete#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;
}
https://ideone.com/ktiXhR
DeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete