All pastes #421837 Raw Edit

State stuff

public cpp v1 · immutable
·published 2007-04-03 02:03 UTC
rendered paste body
// American_Sales_Regions.cpp : main project file.#include"stdafx.h"#include<iostream>#include<string.h>using namespace std;/*Main function is int data type: allows program to return 0; and loop until user is done with program. */int iEscape = 0;int main() {		do{	char szState[25];	cout <<"Please enter your desired destination." << endl;	cin >> szState;// New England Sales Region	if (!strcmp(szState, "Maine")		||!strcmp(szState, "New_Hampshire")		||!strcmp(szState, "Vermont")		||!strcmp(szState, "Massachusetts")		||!strcmp (szState, "Connecticut")		||!strcmp (szState, "Rhode_Island"))	cout << szState <<" is in the New England sales region."<< endl;// North-Atlantic Sales Region	else if (!strcmp (szState, "New_York")		||!strcmp (szState, "New_Jersey")		||!strcmp (szState, "Pennsylvania"))	cout << szState <<" is in the North-Atlantic sales region."<< endl;//Mid-Atlantic Sales Region	else if (!strcmp (szState, "Delaware")		||!strcmp (szState, "Maryland")		||!strcmp (szState, "West_Virginia")		||!strcmp (szState, "Virginia")		||!strcmp (szState, "North_Carolina")		||!strcmp (szState, "South_Carolina")		||!strcmp (szState, "Kentucky")		||!strcmp (szState, "Washington D.C.")		||!strcmp (szState, "Tennessee"))	cout << szState <<" is in the Mid-Atlantic sales region."<< endl;//Tha Dirty South sales region	else if (!strcmp (szState, "Georgia")		||!strcmp (szState, "Florida")		||!strcmp (szState, "Puerto_Rico")		||!strcmp (szState, "Alabama")		||!strcmp (szState, "Virgin_Islands")		||!strcmp (szState, "Florida")		||!strcmp (szState, "Mississippi"))	cout << szState <<" is in tha Dirty South sales region y'all."<< endl;//Great Lakes sales region	else if (!strcmp (szState,"Ohio")		||!strcmp (szState, "Michigan")		||!strcmp (szState, "Wisconsin")		||!strcmp (szState, "Indiana")		||!strcmp (szState, "Illinois"))	cout << szState <<" is in the Great Lakes sales region." << endl;// Middle American sales region	else if (!strcmp (szState, "Minnesota")		||!strcmp (szState, "Iowa")		||!strcmp (szState, "Missouri")		||!strcmp (szState, "North_Dakota")		||!strcmp (szState, "South_Dakota")		||!strcmp (szState, "Nebraska")		||!strcmp (szState, "Kansas"))	cout <<szState <<" is in the Middle American sales region."<< endl;//The Deep South sales region	else if (!strcmp (szState,"Texas")		||!strcmp (szState, "Louisiana")		||!strcmp (szState, "Arkansas")		||!strcmp (szState, "Oklahoma"))	cout << szState <<" is in the Deep South sales region."<< endl;//The Rockies(Mid-West) sales region	else if (!strcmp (szState,"Montana")		||!strcmp (szState, "Idaho")		||!strcmp (szState, "Colorado")		||!strcmp (szState, "Wyoming")		||!strcmp (szState, "Arizona")		||!strcmp (szState, "New_Mexico")		||!strcmp (szState, "Nevada")		||!strcmp (szState, "Utah"))	cout << szState <<" is in the Rockies(Mid-West) sales region."<< endl;//The Pacific West Sales Region	else if (!strcmp (szState, "Washington")		||!strcmp (szState, "Oregon")		||!strcmp (szState, "California")		||!strcmp (szState, "Hawaii"))	cout << szState <<" is in the Pacific West sales region."<< endl;	//Check to see if the user wants out,	else if (!strcmp (szState, "exit")		||!strcmp (szState, "Exit"))		return 0;		//For those who can't spell	else cout <<"Unidentifiable Destination,please try again.";	} while (1); //while 1 always equates to true, so it'll loop forever}