Question #241649

 Write a program that uses the following three structures to store the weather data for a particular month:  



Expert's answer



#include <iostream>


using namespace std;


struct weather{
    double rainfall;
    double humidity;
    double temperature;
};
int main()
{
    struct weather w;
    cout<<"\nEnter rainfall: ";
    cin>>w.rainfall;
    cout<<"\nEnter humidity: ";
    cin>>w.humidity;
    cout<<"\nEnter temperature: ";
    cin>>w.temperature;


    cout<<"rainfall: "<<w.rainfall;
    cout<<"humidity: "<<w.humidity;
    cout<<"temperature: "<<w.temperature;
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS