#include <iostream>
#include <string.h>
using namespace std;
template <class T>
void Swap(T &x, T &y)
{
T z;
strcpy(z,x);
strcpy(x,y);
strcpy(y,z);
};
int main() {
char a[20], b[20];
cin>>a>>b;
Swap(a,b);
cout<<a<<" "<<b;
return 0;
}
#include <string.h>
using namespace std;
template <class T>
void Swap(T &x, T &y)
{
T z;
strcpy(z,x);
strcpy(x,y);
strcpy(y,z);
};
int main() {
char a[20], b[20];
cin>>a>>b;
Swap(a,b);
cout<<a<<" "<<b;
return 0;
}
71% only working
ReplyDeleteit's enough for u hehe
Delete#include
Deleteusing namespace std;
template
T Swap(T x,T y)
{
cout<>a>>b;
Swap(a,b);
ret
#include
ReplyDeleteusing namespace std;
template
T Swap(T x,T y)
{
cout<>a>>b;
Swap(a,b);
return 0;
}
#include
ReplyDeleteusing namespace std;
template
T Swap(T x,T y)
{
cout<>a>>b;
Swap(a,b);
return 0;
}
This comment has been removed by the author.
ReplyDelete#include
ReplyDelete#include
using namespace std;
template
void Swap(T &x,T &y)
{
T z;
strcpy(z,x);
strcpy(x,y);
strcpy(y,z);
};
int main() {
char a[20], b[20];
cin>>a>>b;
Swap(a,b);
cout<<a<<" "<<b;
return 0;
}
0% bro
ReplyDelete#include
ReplyDelete#include
using namespace std;
template
void Swap(T &x,T &y)
{
T z;
strcpy(z,x);
strcpy(x,y);
strcpy(y,z);
};
int main() {
char a[20],b[20];
cin>>a>>b;
Swap(a,b);
cout<<a<<" "<<b;
return 0;
}
works 100%
it doesn't
Delete#include
ReplyDelete#include
using namespace std;
template
void Swap(T &x,T &y)
{
T z;
strcpy(z,x);
strcpy(x,y);
strcpy(y,z);
};
int main()
{
char a[20], b[20];
cin>>a>>b;
Swap(a,b);
cout<<a<<" "<<b;
return 0;
}
Works 0%
Delete#include
ReplyDelete#include
using namespace std;
//template
void Swap(T &x,T &y)
{
T z;
strcpy(z,x);
strcpy(x,y);
strcpy(y,z);
};
int main()
{
char a[20], b[20];
cin>>a>>b;
Swap(a,b);
cout<<a<<" "<<b;
return 0;
}
#include
ReplyDeleteusing namespace std;
template
void Swap(T &x,T &y)
{
T temp;
temp=x;
x=y;
y=temp;
}
int main()
{
string a,b;
cin>>a>>b;
Swap(a,b);
cout<<a<<" "<<b;
return 0;
}
works 100%