136k views
8 votes
Write a program that accepts three decimal numbers as input and outputs their sum.

User TAGraves
by
6.8k points

1 Answer

6 votes

Answer:

void sum(float a, float b, float c){

printf("%0.3f", (a + b + c));

}

Step-by-step explanation:

The answer given is written in C, but the same function can be reimplemented easily in whatever language this is required in.

User Heyydrien
by
7.3k points