Question: This ia c++ programming question QUESTION 8 [16 Marks] Meteorological Department is responsible to keep the information about weather forecast in Malaysia and display the

This ia c++ programming question

 This ia c++ programming question QUESTION 8 [16 Marks] Meteorological Department

QUESTION 8 [16 Marks] Meteorological Department is responsible to keep the information about weather forecast in Malaysia and display the information through the website. Write the code segment for each of the following tasks: (a) i) Declare a structure type named TempScale, with the following members: fahrenheit : a double value a double value celsius ii) Declare a structure type named Reading, with the following members: windSpeed : an integer value humidity : a double value temperature: a TempScale structure variable iii) Declare a variable of structure type Reading named today. (6 marks) Answer: (b) Write statements that will store the following data into the variable you declared in (a). Wind speed: 8 km/h Humidity: 53% Fahrenheit temperature: 80.2 degrees Celsius temperature: 26.8 degrees (3 marks) Answer: (C) Define a function named showReading. It should accept a Reading structure variable as its argument. The function should display the contents of the variable onto (7 marks) the screen

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!