Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int isafter(char char1, char char2)
- {
- if(char1 == char2){return 0;}
- if(char1<char2){return -1;}
- if(char1>char2){return 1;}
- }
- int isBefore(char* s1, char* s2){
- int i=0;
- while(s1[i] != '\0' && s2[i] != '\0')
- {
- if(isafter(s1[i],s2[i]==-1))
- {
- return 1;
- }
- if(isafter(s1[i],s2[i]==1))
- {
- return 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement