Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- int i;
- char firstName[50],secondName[50];
- printf("Entre com o primeiro nome :\n");
- gets(firstName);
- printf("Entre com o segundo nome :\n");
- gets(secondName);
- if (strcmp(firstName,secondName) < 0)
- printf("%s, %s\n",firstName,secondName);
- else
- printf("%s, %s\n",secondName,firstName);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment