Skip to content

Commit

Permalink
Exercício 4 da aula 7 resolvido
Browse files Browse the repository at this point in the history
  • Loading branch information
eFilipexCode authored Jun 1, 2022
1 parent 01ef1f8 commit e795ef9
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

struct Flight {
int numFlight;
char origin[50];
char destination[50];
char origin[20];
char destination[20];
};

int main() {
Expand All @@ -18,18 +18,19 @@ int main() {
printf("Digite o numero do %dn voo: ", i + 1);
scanf("%d", &flights[i].numFlight);

char origin[50];
scanf("%s", &origin);
printf("Digite o local de origem: ");
scanf("%s", &flights[i].origin);

char destination[50];
scanf("%s", &destination);
printf("Digite o local de destino: ");
scanf("%s", &flights[i].destination);
};

printf("Lista dos proximos voos:\n");
printf("NRO_VOO | ORIGEM | DESTINO \n");
for (int i = 0; i < qtFlight; i++) {
printf(" %d | ", flights[i].numFlight);
printf(" %s | ", flights[i].origin);
printf(" %s | \n", flights[i].destination);
};

return 0;
Expand Down

0 comments on commit e795ef9

Please sign in to comment.