I am working on an assignment, it basically asks that i use two functions main (void) and compute_num_checkouts, and i am supposed to ask the user how many customers their are and divide the num of customers by 15 ( the max per checkout) and output (rounding up) the number of checkouts.
the thing is i can't figure out how to write the functions, or assign the values, i got confused and the book doesn't seem to help - Can you help me??
this is what i have so far - thank you LISA, feel free to email me at [email protected], thanks
#include <stdio.h>
#define CUSTOMERS_PER_HOUR 15
/*function prototypes*/
int
comp_num_checkouts(int, CUSTOMERS_PER_HOUR);
int
main(void)
{
int
num_customers,
checkouts_req;
printf( "Enter the number of customers:" );
scanf( "%d", &num_customers );
/* customers divided by 15 - the max per checkout */
checkouts_req = comp_num_checkouts(????/CUSTOMERS_PER_HOUR);
printf( "\n you told me that the number of customers per hour is %d \n\n" );
printf( "%d", &num_customers);
printf( "the number of checkouts required is %d (checkouts_req) \n" );
printf( "%d", &checkouts_req);
return(0);
}
int
compute_num_checkouts (int, CUSTOMERS_PER_HOUR);
{
int
/* computes the number of checkouts,customers divided by 15 */
checkouts(arguement-specifiers);
return (checkouts);
}