Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- #include<stdio.h>
- using namespace std;
- char a[101], b[101], s[101];
- int i=0,j,ok=1;
- int main()
- {cout<<'cuvant1:'; cin>>a;
- cout<<'cuvant2:'; cin>>b;
- do
- {
- if(a[strlen(a]-1-i)]==b[strlen(b)-1-i])
- S[i]=a[strlen(a)-1-i]
- else ok=0;
- i++
- }
- while(ok!=0)
- for(j=strlen(s))-1;j>=a;j++)
- cout<<s[j];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement