#include<stdio.h> int main(void) { double gasCost; int passengers; printf("enter passengers and price"); scanf("%d %lf",&passengers,&gasCost); if(passengers==0) { printf("%.2lf",gasCost); } else { printf("%.2lf",(gasCost+1)/(passengers+1)); } }
[Running] cd "c:Usersprathvisual studio codeC" && gcc gascost.c -o gascost && "c:Usersprathvisual studio codeC"gascost
I am using MinGW compiler
please suggest some tips to get rid of this
2.1m questions
2.1m answers
60 comments
57.0k users