2. (Car-Pool Savings Calculator) Research several car-pooling websites. Create an application that calculates your daily driving cost, so that you can estimate how much money could be saved by carpooling, which also has other advantages such as reducing carbon emissions and reducing traffic congestion. The application should input the following information and display the user’s cost per day of driving to work: a) Total miles driven per day. b) Cost per gallon of gasoline. c) Average miles per gallon. d) Parking fees per day. e) Tolls per day.

PHOTO EMBED

Thu Jan 18 2024 06:12:02 GMT+0000 (Coordinated Universal Time)

Saved by @kervinandy123 #c

#include <stdio.h>

int main()
{
    int a, b, c, d, e, total;
    
    printf("Total miles driven per day:");
    scanf("%d", &a);
    printf("Cost per gallon of gasoline:");
    scanf("%d", &b);
    printf("Average miles per gallon:");
    scanf("%d", &c);
    printf("Parking fees per days:");
    scanf("%d", &d);
    printf("Tolls per day:");
    scanf("%d", &e);
    
    
    total = (a/c)*b+d+e;
    printf("Cost per Day: %d", total);
    
 
    return 0;
}
content_copyCOPY