Advertisement
2002ASP Complete Applications #7334

Profile Creator

It asks you name, age, height, etc. and puts them in a *.txt file...

AI

AI 요약: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

소스 코드
original-source
#include <iostream.h>
#include <fstream.h>
/////////////////////////
//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";
}
원본 댓글 (3)
Wayback Machine에서 복구됨