Question: shorten the code by making those arrays before adding in C++ you have const double CAR =2 const double TRAIN =5 const double BOAT =7

shorten the code by making those arrays before adding shorten the code by making those arrays before adding in C++ you

in C++ you have const double CAR =2 const double TRAIN =5 const double BOAT =7 const double PLANE =9 double cars 1=CAR double cars 2= CAR double cars 7=CAR double trains = TRIAN double boats = BOAT double planes 1= PLANE double planes 2= PLANE double planes 9= PLANE write a function that adds up all the variables and prints that result to the user

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!