Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IFF - Introdução à Programação
- //Slide - Página 43 - Exercício 3
- #include<stdio.h>
- #include<locale.h>
- #include<string.h>
- int main(){
- setlocale(LC_ALL,"Portuguese");
- char nome1[60], nome2[60], resposta[3];
- do{
- printf("Entre com o primeiro e o segundo nome respectivamente. Separados por um Enter: ");
- gets(nome1);gets(nome2);
- if(strlen(nome1)>strlen(nome2)) printf("O menor nome foi: %s.", strlwr(nome2)); else printf("O menor nome foi: %s.",strlwr(nome1));
- printf("\nDeseja nova consulta? ");
- gets(resposta);
- }while (stricmp(resposta,"sim")==0);
- }
Advertisement
Add Comment
Please, Sign In to add comment