Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Declare a strucure named TempScale, with the followingmembers: fahrenheit : a do

ID: 3609318 • Letter: D

Question

Declare a strucure named TempScale, with the followingmembers: fahrenheit : a double centigrade : a double Next, declare a structure named Reading, with the followingmembers: windSpeed : an int humidity: a double temperature: a TempScale structure variable write a function called recordReading. It should use a Readingstructure pointer variable as its parameter. The function shouldask the user to enter values for each member of the structurepointed to by the parameter. Write a function called ShowReading. It should accept aReading structure refrence variable as its argument. The functionshould display the contents of the variable on the screen. Write a program that demonstrate this functions. Declare a strucure named TempScale, with the followingmembers: fahrenheit : a double centigrade : a double Next, declare a structure named Reading, with the followingmembers: windSpeed : an int humidity: a double temperature: a TempScale structure variable write a function called recordReading. It should use a Readingstructure pointer variable as its parameter. The function shouldask the user to enter values for each member of the structurepointed to by the parameter. Write a function called ShowReading. It should accept aReading structure refrence variable as its argument. The functionshould display the contents of the variable on the screen. Write a program that demonstrate this functions.

Explanation / Answer

struct Reading r;
recordReading(&r);
showReading(&r);
system("pause");
   
}


/* Sample output
enter windSpeed:12
enter humidity:1.2
enter fahrenheit:22.14
enter centigrade:64.1


showReading
windSpeed:12
humidity:1.2
fahrenheit:22.14
enter centigrade:64.1
Press any key to continue . . .


*/

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote