Code:
#include <stdio.h>


void calcsubtotal(int days, double rate, double food, double* totalFood, double* totalRate)
{  *totalFood = days * food;
    *totalRate = (days - 1) * rate; }


void calctotal(int days, double airfare, double ground, double rate, double food, double enter, double* totalF, double* totalR, double* total)
{  double totalFood;
    double totalRate;

    calcsubtotal(days, rate, food, &totalFood, &totalRate);

    *total = totalFood + totalRate + airfare + ground + enter;
    *totalF = totalFood;
    *totalR = totalRate;  }


void output(int days, double airfare, double ground, double rate, double food, double enter, double totalF, double totalR, double total)
{  printf("\nDays: %d\n", days);
    printf("Airfare: %.2lf\n", airfare);
    printf("Ground Transportations: %.2lf\n", ground);
    printf("Hotel: %.2lf\n", totalR);
    printf("Food: %.2lf\n", totalF);
    printf("Entertainment: %.2lf\n", enter);
    printf("\n");
    printf("Total: %.2lf\n\n", total); }


void getData(int* days,double* airfare, double* ground, double* rate, double* food, double* enter)
{   printf("how many days: ");
    scanf("%d", days);

    printf("How much is the airfare: ");
    scanf("%lf", airfare);

    printf("How much is the ground fare: ");
    scanf("%lf", ground);

    printf("How much is the hotel rate: ");
    scanf("%lf", rate);

    printf("How much is the food price: ");
    scanf("%lf", food);

    printf("How much is the cost of entertainment: ");
    scanf("%lf", enter);  }


int main(void)
{   int days;
    double airfare;
    double ground;
    double rate;
    double food;
    double enter;
    double totalF;
    double totalR;
    double total;
    double subtotal;

    getData(&days, &airfare, &ground, &rate, &food, &enter);
    calctotal(days, airfare, ground, rate, food, enter, &totalF, &totalR, &total);
    output(days, airfare, ground, rate, food, enter, totalF, totalR, total);

    return 0; }