MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / setClimateData

Method setClimateData

Lab_21/city_temperature_control.cpp:115–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113public:
114
115 void setClimateData() {
116 average = 0;
117 City::input();
118
119 cout << "Enter Rainfall Degree: " << endl;
120
121 for (int i = 0; i < 12; i++) {
122 cout << i+1 << " Month: ";
123
124 cin >> cityClimateDate[i];
125
126 if (cityClimateDate[i] > 0 && cityClimateDate[i] < 300) {
127 average = average + cityClimateDate[i];
128 }
129 else {
130 cout << "Please check your input! " << endl;
131 i--; // checking and returning
132 }
133 } // for ends
134
135 }
136
137 void getClimateData() {
138

Callers 3

CityTemperatureInfoFunction · 0.45
CityRainFallInfoFunction · 0.45
CityHumidityInfoFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected