Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- using namespace std;
- int main()
- {
- int i;
- char s[25],x[25];
- cin.get(s,25);
- cin.get();
- for(i=0;i<strlen(s);i++)
- if(strcmp(x,s+i)<0)
- strcpy(x,s+i);
- cout<<x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement