/*************************************************************8 * Sunshine on My Shoulder * sunshine.cpp detrimines teh average outdoor temperature in a well insulated room * input: Type of window * With of Window * With or room, length of room (in feet) * output: Average indoor temperature in degrees F. **************************************************************/ #include #include int main() { cout <<"Welcome to Mark's Average Room Temperature Calculator!" "Please Enter Your Window \nSpecifications. " "\nType of Window: \n1 for Single Paned \n2 For Double Paned: "; double pane; cin >> pane; cout <<"Good! Please enter the height of your window in feet: "; double height; cin >> height; cout<< "Excellent! Now enter the width of your window in feet: "; double width; cin >> width; double windowArea = width*height; cout<< "Now enter the width followed by the length of your room: "; double roomWidth; double roomLength; cout << "\nWidth: "; cin >> roomWidth; cout << "\nLength: "; cin >> roomLength; double roomArea = roomWidth*roomLength; double avgOutTemp = 28.9; if (pane == 1) { double HLF = 13; double HGF = 1540; double avgintemp = (HGF*windowArea)/(HLF * roomArea) +avgOutTemp; cout <<"Your average indoor tempuerature is " << avgintemp << " degrees" " °F."; } else if (pane ==2) { double HLF = 9.7; double HGF = 1416; double avgintemp = (HGF*windowArea)/(HLF * roomArea) +avgOutTemp; cout <<"Your average indoor tempuerature is " << avgintemp << " degrees" " °F."; } return 0; }