Suppose that you have the following definitions:
struct time Type
struct tourType
{
int hr;
double min;
int sec;
string cityName;
int distance;
timeType travelTime;
};
};
a. Declare a variable destination of type tourType.
b. Write C++ statements to store the following data in destination: cityName - Chicago, distance -- 550
miles, travelTime - 9 hours and 30 minutes.
c. Write the definition of a function to output the data stored in a variable of type tourType.
d. Write the definition of a value-returning function tat inputs data into a variable of type tourType.
e. Write the definition of a void function with a reference parameter of type tourType to input data in a
variable of type to tourType


Sagot :

Suppose that you have the following definitions:struct time Type struct tourTypen the variable destination of type your type are tourType input(){cout<<"Enter the city, distance and time in hr and min"<>destination.city name;

What is C++ statements?

Expression statements. These statements examine an expression for its aspect outcomes or for its go-back value. Null statements. These statements may be supplied in which a declaration is needed with the aid of using the C++ syntax however in which no motion is to be taken.

  1. #include
  2. #include
  3. the use of namespace std;
  4. struct timeType
  5. ;
  6. struct tourType
  7. ;
  8. tourType destination;
  9. tourType input(){
  10. cout<<"Enter the city, distance and time in hr and min"<>destination.cityName;
  11. cin>>destination.distance;
  12. cin>>destination.travelTime.hr;
  13. cin>>destination.travelTime.min;
  14. go back destination;
  15. }
  16. void display()cityName;
  17. d.distance = t->distance;
  18. d.travelTime.hr = t->travelTime.hr;
  19. d.travelTime.min = t->travelTime.min;">
  20. int main().

Read more about the variable :

https://brainly.com/question/2804470

#SPJ1