.

Sunday, May 19, 2019

Final Project

Final Project Part 2(Worth 20% of your grade) Student distinguish James Keys Class/Section CMIS 102 Professor Name Jose Romero Assignment due date 11/4/12 // Which State. cpp include stdafx. h include <iostream> include < quarter> using namespace std int main() int x = 0 int fix = 0 int count=0 float sum float medium int age10 string name10 string Find_State = string enunciate10 string state_abbr10 bool okay = true do cout << Enter the family members name. Type done when complete. ltlt endl cin gtgt namecount if ( namecount == DONE namecount==done) okay = dishonest break cout ltlt Enter family members age ltlt endl cin gtgt agecount cout ltlt Which state is ltlt namecount ltlt from? Type in CA, NY, TX, VA, VT? ltlt endl cin gtgt statecount if ( statecount == CA statecount == ca) statecount = California state_abbrcount = CA else if (statecount==TX statecount == tx) statecount = Texas tate_abbrcount = TX else if (statecount==VA statecount == va) stateco unt = Virginia state_abbrcount = VA else if (statecount==NY statecount == ny) statecount = New York state_abbrcount = NY else if (statecount==VT statecount == vt) statecount = Vermont state_abbrcount = VT else cout ltlt I dont understand ltlt endl count count++ while (okay count = 10) char yn= do cout << Do you wish to list people living in a certain state? << endl cin >> yn if ( yn == Y) cout << Enter the state abbreviation cin >> Find_State for (x=0x<countx++) if (state_abbrx == Find_State) cout << namex << lives in << statex << endl found++ if ( found) cout << Couldnt find anyone living in the state of << Find_State << . << endl else if ( yn == N) cout << Okay, well continue on << endl << endl break while (yn Y yn = N) sum = 0. 0 average = 0. 0 for ( x=0x<countx++) sum = sum + agex average = sum/count cout << endl << endl << The average age of your family is << a verage << years old. << endl << endl cout << The entered data was << endl << endl for ( x=0 x < count x++) cout << namex << lives in << statex << and is << agex << years old. << endl return 0

No comments:

Post a Comment