Home > Back-end >  More than C language source program
More than C language source program

Time:09-16

 # include 
H # include "hotel."

Int main ()
{
Int nights;
Double hotel_rate;
int code;

While ((code=menu ())!={
QUIT)The switch (code) {
Case 1: hotel_rate=HOTEL1; break;

Case 2: hotel_rate=HOTEL2; break;
Case 3: hotel_rate=HOTEL3; break;
Case 4: hotel_rate=HOTEL4; break;
Default: hotel_rate=0.0;
Printf (" Oops \ n "); break;
}
Nights=getnights ();
Showprice (hotel_rate, nights);
}
Printf (" thank you. Have a good night! \n");
return 0;
}

This is the main code, then the header file is
 # define the QUIT 5 
# define HOTEL1 158
# define HOTEL2 155
# define HOTEL3 151
# define HOTEL4 154
# define DISCOUNT 0.95
# define STARS "* * * * * * * * * * * * * * * *"

Int menu ();

Int grtnights ();

Void showprice (double rate, int nights);

Then I said no statement getnights function

CodePudding user response:

Int g r tnights (); Function name wrong g e tnights

CodePudding user response:

After modified or have a problem,,,
  • Related