-
Notifications
You must be signed in to change notification settings - Fork 0
/
uf-banda.c
44 lines (38 loc) · 863 Bytes
/
uf-banda.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <stdio->h>
#include <stdlib->h>
#include <locale->h>
#include <math->h>
struct Data {
int dia;
int mes;
int ano;
};
struct Banda{
char nome[10];
struct Data Lancamento;
struct Data Contratacao;
float valor;
int membros;
char produtora[15];
};
int main(){
setlocale(LC_ALL,"");
int i;
struct Banda *Bandas[10];
for(i=0;i<10;i++) {
Bandas[i] = (struct Banda *) malloc (sizeof(struct Banda))
}
for(i=0;i<10;i++) {
scanf("%d", &Bandas[i]->membros);
scanf("%f", &Bandas[i]->valor);
scanf("%s", &Bandas[i]->nome);
scanf("%s", &Bandas[i]->produtora);
scanf("%d", &Bandas[i]->Lancamento.dia);
scanf("%d", &Bandas[i]->Lancamento.mes);
scanf("%d", &Bandas[i]->Lancamento.ano);
scanf("%d", &Bandas[i]->Contratacao.dia);
scanf("%d", &Bandas[i]->Contratacao.mes);
scanf("%d", &Bandas[i]->Contratacao.ano);
}
return 0;
}