daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5. {
  6.   char sex[5], nome[200], f, m;
  7.  
  8.   printf("n Digite o seu nome: " ); //pegar o nome da pessoa
  9.   scanf(" %[^n]s", &nome);
  10.  
  11.   printf("n Digite seu sexo f ou m: "); //pegar o sexo da pessoa
  12.   scanf("%s", &sex);
  13.  
  14.    if(sex == m)
  15.     {
  16.         printf(" bem vindo Senhor %sn", nome); // se for homem
  17.     }
  18.  
  19.    if (sex == f)
  20.     {
  21.        printf(" Bem vinda Senhora %sn", nome); // sefor mulher
  22.     }
  23.  
  24.   else
  25.    {
  26.        printf("n ERRO! n");
  27.    }
  28.  
  29. getchar();  
  30. return 0;  
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top