Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 screenStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started