Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- char nome[10],cidade[15],resposta[1];
- printf("ola,qual eh seu nome n");
- scanf("%s",nome);
- printf("%s eh um nome legaln",nome);
- printf("mora onde? n");
- scanf("%s",cidade);
- printf("%s eh um lugar divertido?n",cidade);
- scanf("%s",resposta);
- if(resposta=="s"){
- printf("Que legal!Eu gostaria de morar em %sn",cidade);
- }
- else if(resposta=="n"){
- printf("Deve se chato morar em %sn",cidade);
- }
- else{
- printf("Digite s ou n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement