Final Project

Final Project Part 2(Worth 20% of your gait) Student Name: 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 <string> using callspace std; int ocean() { int x = 0; int plant = 0; int estimate=0; transport sum; transport mean; int age[10]; string call[10]; string Find_State = ""; string set-forth[10]; string set-forth_abbr[10]; bool okay = true; do { cout << "Enter the race member's call. Type 'done' when perfect. ;lt;;lt; endl; cin ;gt;;gt; call[count]; if ( call[count] == "DONE" || call[count]=="done") { okay = false; break; } cout ;lt;;lt; "Enter race member's age" ;lt;;lt; endl; cin ;gt;;gt; age[count]; cout ;lt;;lt; "Which set-forth is " ;lt;;lt; call[count] ;lt;;lt; " from? Type in CA, NY, TX, VA, VT? " ;lt;;lt; endl; cin ;gt;;gt; set-forth[count]; if ( set-forth[count] == "CA" || set-forth[count] == "ca") { set-forth[count] = "California"; set-forth_abbr[count] = "CA"; } else if (state[count]=="TX" || set-forth[count] == "tx") { set-forth[count] = "Texas"; tate_abbr[count] = "TX"; } else if (state[count]=="VA" || set-forth[count] == "va") { set-forth[count] = "Virginia"; set-forth_abbr[count] = "VA"; } else if (state[count]=="NY" || set-forth[count] == "ny") { set-forth[count] = "New York"; set-forth_abbr[count] = "NY"; } else if (state[count]=="VT" || set-forth[count] == "vt") { set-forth[count] = "Vermont"; set-forth_abbr[count] = "VT"; } else { cout ;lt;;lt; "I don't understand!! " ;lt;;lt; endl; estimate--; } estimate++; } occasion (okay || estimate ! = 10); char yn=' '; do { cout << "Do you eagerness to register populace buttress in a established set-forth? << endl; cin >> yn; if ( yn == 'Y') { cout << "Enter the set-forth compendiousness : "; cin >> Find_State; for (x=0;x<count;x++) if (state_abbr[x] == Find_State) { cout << call[x] << " lives in " << set-forth[x] << endl; plant++; } if (! plant) { cout << "Couldn't invent anyone buttress in the set-forth of " << Find_State << ". " << endl; } } else if ( yn == 'N') cout << "Okay, we'll abide on!! " << endl << endl; break; } occasion (yn ! 'Y' || yn ! = 'N'); sum = 0. 0; mean = 0. 0; for ( x=0;x<count;x++) { sum = sum + age[x]; } mean = sum/count; cout << endl << endl << "The mean age of your race is " << mean << " years old. " << endl << endl; cout << "The entered grounds was :" << endl << endl; for ( x=0; x < estimate ;x++) { cout << call[x] << " lives in " << set-forth[x] << " and is " << age[x] << " years old. " << endl; } repay 0;