#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; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter