Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- char sex[5], nome[200], f, m;
- printf("n Digite o seu nome: " ); //pegar o nome da pessoa
- scanf(" %[^n]s", &nome);
- printf("n Digite seu sexo f ou m: "); //pegar o sexo da pessoa
- scanf("%s", &sex);
- if(sex == m)
- {
- printf(" bem vindo Senhor %sn", nome); // se for homem
- }
- if (sex == f)
- {
- printf(" Bem vinda Senhora %sn", nome); // sefor mulher
- }
- else
- {
- printf("n ERRO! n");
- }
- getchar();
- return 0;
- }
Add Comment
Please, Sign In to add comment