#include <stdio.h>
#include <string.h>
#include <stdlib.h>
/*******************************************************************************
* List preprocessing directives – you may define your own.
*******************************************************************************/
#define MAX_FLIGHTCODE_LEN 6
#define MAX_CITYCODE_LEN 3
#define MAX_NUM_FLIGHTS 5
#define DB_NAME “database”
/*******************************************************************************
* List structs – you may define struct date and struct studentonly. Each
* struct definition should have only the fields mentioned in theassignment
* description.
*******************************************************************************/
struct date_time
{
int month;
int day;
int hour;
int minute;
};
typedef struct date_time date_time_t;
struct flight
{
char flightcode[MAX_FLIGHTCODE_LEN+1];
date_time_t departure_dt;
char arrival_city [MAX_CITYCODE_LEN+1];
date_time_t arrival_t;
};
typedef struct flight flight_t;
int main()
{
char second_choice[MAX_CITYCODE_LEN+1];
int i=0;
printf(“Enter arrival city code or enter * to show alldestinations>n”);
scanf(“%s”,second_choice);
if(i==0)
{
printf(“No flightsn”);
}
else if(strcmp(second_choice,”*”)==0){
while(i>0)
{
printf(“something”)
i–;
printf(“n”);
}
}
else
{
// some code to compare second_choice to the ” char arrival_city[MAX_CITYCODE_LEN+1] ” member of structure flight_t for everyflight_t type structure in the fligths array.
}
}
My task was
PayPal Gateway not configured
PayPal Gateway not configured