Reginaldojs

exercicio 2,lista 6

Nov 2nd, 2012
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.59 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #define N 50
  4. struct contato{
  5.        char pessoa[40],empresa[30];
  6.        int lista[10];
  7.        };
  8. int main(){
  9.     struct  contato Agenda[50];
  10.     int i,j;
  11.     for(i=0;i<N;i++){
  12.       printf("entre com o nome da empresa:");
  13.       gets(Agenda[i].empresa);
  14.       fflush(stdin);
  15.       printf("quem eh o rsponsavel:");
  16.       gets(Agenda[i].pessoa);
  17.       fflush(stdin);
  18.       for(j=0;j<13;j++){
  19.          printf("entre com o %d contato desta empresa:",j+1);
  20.          scanf("%d",&Agenda[i].lista[j]);
  21.       }
  22.     }
  23.     system("pause");
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment