Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 1 Lncs 8055

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013 Edition

3642402844, 978-3642402845

More Books

Students also viewed these Databases questions

Question

Answered: 1 week ago

Answered: 1 week ago

Question

6. Explain how to train managers to coach employees.

Answered: 1 week ago