Final Project

Only available on StudyMode
  • Topic: C++, C, Perl
  • Pages : 4 (447 words )
  • Download(s) : 167
  • Published : November 9, 2012
Open Document
Text Preview
UCCMIS102 Final Project Part 2(Worth 20% of your grade)

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 namespace std;
int main()
{
int x = 0;
int found = 0;
int count=0;
float sum;
float average;
int age[10];
string name[10];
string Find_State = "";
string state[10];
string state_abbr[10];
bool okay = true;

do
{
cout << "Enter the family member's name. Type 'done' when complete." << endl;
cin >> name[count];
if ( name[count] == "DONE" || name[count]=="done")
{
okay = false;
break;
}

cout << "Enter family member's age" << endl;
cin >> age[count];

cout << "Which state is " << name[count] << " from? Type in CA, NY, TX, VA, VT?" << endl;
cin >> state[count];
if ( state[count] == "CA" || state[count] == "ca")
{
state[count] = "California";
state_abbr[count] = "CA";
}
else if (state[count]=="TX" || state[count] == "tx")
{
state[count] = "Texas";
state_abbr[count] = "TX";...
tracking img