Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #define MAX 1000
- //27. Solicite dois nomes ao usuário, em seguida verifique se os dois são exatamente iguais.
- int main()
- {
- char nome1[MAX],nome2[MAX];
- printf("\n Digite dois nomes: \n");
- fgets(nome1,MAX,stdin);
- fgets(nome2,MAX,stdin);
- if(strcmp(nome1,nome2)==0)
- {
- printf("\n Sao exatamente iguais!");
- }else{
- printf("\n Nao sao exatamente iguais!");
- }
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement