Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

please input three double floats and print the average.

0 votes
asked Mar 28, 2018 by zaynia

1 Answer

+1 vote
answered Mar 28, 2018 by John Gabriel (310 points)
Just paste this into your main function:

    double d1,d2,d3;
    printf("\nEnter first double: ");
    scanf("%lf",&d1);
    printf("\nEnter second double: ");
    scanf("%lf",&d2);
    printf("\nEnter third double: ");
    scanf("%lf",&d3);
    d1 = (d1+d2+d3)/3;
    printf("\nAverage = %lf ", d1);
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...