Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #define MAX 30
- int main(){
- char s[MAX],s1[MAX],novi[MAX];
- int ds,ds1,p;
- gets(s);
- gets(s1);
- ds=strlen(s);
- ds1=strlen(s1);
- if(ds==ds1){
- printf("-1");
- return -1;
- }
- if(ds>ds1){
- p=ds-ds1;
- for(int i=ds;i>(ds1-1);i--)
- novi[i-p]=s[i];
- }
- printf("%d\n%d\n%d\n%s",ds,ds1,p,novi);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement