Você está na página 1de 3

//==============================================================================

//
// Title:
Source File.c
// Purpose:
A short description of the implementation.
//
// Created on: 28/01/2015 at 10:15:28 by IFES IFES.
// Copyright: IFES. All Rights Reserved.
//
//==============================================================================
//==============================================================================
// Include files
//#include "Source File.h"
//==============================================================================
// Constants
//==============================================================================
// Types
//==============================================================================
// Static global variables
//==============================================================================
// Static functions
//==============================================================================
// Global variables
//==============================================================================
// Global functions
/// HIFN What does your function do?
/// HIPAR x/What inputs does your function expect?
/// HIRET What does your function return?
#include <ansi_c.h>
#include <utility.h>
#include <cvirte.h>
/*
void main()
{
char nome[30];
int idade;
printf("digite seu primeiro nome;");
scanf("%s",nome);
printf("\ndigite a sua identidade;");
scanf("%d",&idade);
printf("\n%s tem %d anos !!!",nome,idade);
GetKey();
}
*/
/*
int main()
{

char string1[10],string2[10];
printf("\n");
printf("copiando uma string em outra\n");
printf("_ _ _ _ _ _ _ _\n");
printf("\n");
printf("digite string1:");
scanf("%s",string1);
printf("\n");
printf("string1= %s\n",string1);
printf("string2=%s\n",strcpy(string2,string1));
getchar();
GetKey();
return(0);
}
*/
#define max 1
int main()
{
int i;
int cont=0;
char nome[30];
char sexo;
int idade;
char civil;
for(i=0;i<max;i++){
printf("digite o seu nome\n\n");
scanf("%s",nome);
getchar();
printf ("digite o seu sexo (m-masculino ou f-feminino)\n");
scanf("%c",&sexo);
getchar();
printf("digite a sua idade\n");
scanf("%d",&idade);
printf("digite seu estado civil s-solteiro,c-casado,d-divorciado ou v-viv
o\n");
scanf("%c",&civil);
getchar();
if(idade>=18&&sexo=='f'&&civil=='s'){
cont=cont+1;
}
}
printf("numero de pessoas do sexo feminino e que tem a maioridade e sol
teiras %d\n",cont);
GetKey();
return(0);
}

Você também pode gostar