You are on page 1of 1

#include<iostream>

#include<string.h>
using namespace std;
int main(){
char a[10], b[10];
int i, x, y=0;
cin.get(a, 10, '\n');
cin.get();
cin.get(b, 10, '\n');
cin.get();
x=strlen(a);

for(i=0; i<=x; i++){


if(a[i]!=b[i])
{if(a[i]<b[i])
cout<<a<<" "<<b;
else
cout<<b<<" "<<a;
break;}
else
y++;}

if((y-1)==x)
cout<<"Cuvintele "<<a<<" si "<<b<<" sunt identice";
return 0;
}

You might also like