129k views
2 votes
If you need to write a function that will compute the cost of some candy, where each piece costs 25 cents, which would be an appropriate function declaration?

(A) int calculateCost(char name);
(B) char calculateCost(int count);
(C) int calculateCost int count;
(D) int calculateCost(int count);

1 Answer

5 votes
The best answer would be

D. Int calculateCost(int count);
User Nonie
by
7.6k points