#include #include char codes[500][4]; int rando() { return (rand()/3); } void main(void) { FILE *script, *flights; int npass,pass,flight,month,day,date,i,j,k,price,paid,went; char seat[10]; srand(time(NULL)); script=fopen("makereservations","w"); if (script==NULL) exit(1); flights=fopen("reservations","w"); if (flights==NULL) exit(1); fprintf(script,"create table reservations\n"); fprintf(script,"( passenger int,\n"); fprintf(script," flight int,\n"); fprintf(script," date int,\n"); fprintf(script," seat char(3),\n"); fprintf(script," price int,\n"); fprintf(script," paid char(1),\n"); fprintf(script," went char(1));\n"); fprintf(flights,"PASGR FLT DATE____ SEAT PRCE P W\n"); for (i=0; i<200; i+=1) { if (i%2==1) npass=10+rando()%20; else npass=50+rando()%100; month=1+rando()%2; if (month==1) day=1+rando()%31; else day=1+rando()%28; date=19990000+month*100+day; flight=100+rando()%100; for (j=0; j