How can i create function that prints out sum of calculation


Problem

How can I create function that prints out the sum of the calculation of all states in an array?

Let us say I want to calculate the total distance of cities in the array [CA, MI, CT, NY, AK, AZ]. I call a distance calculating function which takes in two states as arguments first CA and Mi then MI and CT... . Then I want to add all the distances together?

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: How can i create function that prints out sum of calculation
Reference No:- TGS03234685

Expected delivery within 24 Hours