Please visit our sponsor
UNKNOWN
//**************************************
//INCLUDE files for :Profile Creator
//**************************************
iostream.h, ofstream.h
//**************************************
// Name: Profile Creator
// Description:It asks you name, age, height, etc. and puts them in a *.txt file...
// By: Pat Underwood
//
//
// Inputs:None
//
// Returns:None
//
//Assumes:None
//
//Side Effects:None
//This code is copyrighted and has limited warranties.
//Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.303/lngWId.3/qx/vb/scripts/ShowCode.htm
//for details.
//**************************************
#include
#include
/////////////////////////
//Made By Pat Underwood//
//http://patu.iwarp.com//
/////////////////////////
int age, heightin, heightft;
char firstname[30];
char lastname[30];
char gender[7];
ofstream foo("profiles.txt");
void main () {
//Start questioning
cout << "Enter your first name:\n";
cin >> firstname;
cout << "Enter your last name:\n";
cin >> lastname;
cout << "Enter your gender (male or female):\n";
cin >> gender;
cout << "Enter your age:\n";
cin >> age;
cout << "Enter your height (feet only) :\n";
cin >> heightft;
cout << "Enter your height (inches only) :\n";
cin >> heightin;
//Start confimation
cout << "-" << firstname << lastname << "\n";
cout << "-" << gender << "\n";
cout << "- Age = " << age << "\n";
cout << "-" << heightft << "' " << heightin << "''\n";
foo << "Name: " << firstname << " " << lastname << "\n";
foo << "Gender/Sex: " << gender << "\n";
foo << "Age: " << age << "\n";
foo << "Height: " << heightft << "' " << heightin << "''\n";
cout << "Thank you, your new profile is being created...\n";
cout << "This program was made by Pat Underwood, you can get more of his software at \nhttp://patu.iwarp.com\n";
}