Advertisement
ThaisAlmeida

Untitled

Jul 28th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. typedef struct{
  6.    
  7. int codigo;
  8. char nome[20];
  9. char sexo [10];
  10. int idade;
  11. float altura;
  12. }DADOS;
  13.  
  14.  
  15. void LEITURA(int n){
  16.  
  17. do{
  18. printf("Digite um valor para n entre 2 e 500: ");
  19. scanf("%d",n);
  20.  
  21. }while(!(2 <= n <= 500));
  22. }
  23.  
  24. void CADASTRO(n, DADOS v[500]){
  25.  
  26. for(i=0,i<n,i++){
  27. printf("Digite o nome e o sexo: ");
  28. scanf("%s%s", DADOS.nome, DADOS.sexo);
  29. printf("Digite o código e a idade: ");
  30. scanf("%d%d", &DADOS.codigo, &DADOS.idade);
  31. printf("Digite a altura: ");
  32. scanf("f", &DADOS.altura);
  33. }
  34. }
  35.  
  36. int main(){
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement