Course Solutions Uncategorized (Solved) : Include Include Include List Preprocessing Directives May Define Define Maxflightcodelen Q29097143 . . . .

(Solved) : Include Include Include List Preprocessing Directives May Define Define Maxflightcodelen Q29097143 . . . .

 

#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

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Business Data Communications Question 14 Ping Tells Latency O Round Trip Latency O Cumulat Q31000910 . . . .(Solved) : Business Data Communications Question 14 Ping Tells Latency O Round Trip Latency O Cumulat Q31000910 . . . .

<br/><img src="https://media.cheggcdn.com/media%2F363%2F3639bc9f-a607-451d-8c75-85de546d6a5c%2Fimage" alt="Business Data Communications QUESTION 14 Ping tells you latency O round-trip latency O cumulative latency to each router along the route O none of the above 10 points