Spicy Life Game- By Mohammad Nashir (Copyright).
Code:
"#include <iostream>
#include <cstring>
//Author and Copyright: Mohammad Nashir
// http://mohammadnashir.blogspot.com/
using namespace std;
int main()
{
int age;
int gender;
int time;
int house;
char name[20];
char lastname[20];
char fullname[50];
cout << "Welcome to Mohammad's Game - Spicy Life. Please Enter a Name for your Final Fantasy Character Below: " << endl;
cout << "First Name" << endl;
cin.getline ( name, 20 );
if ( strcmp ( name, "Rikku" ) == 0 )
cout <<"First Name Registered!\n";
else
cout <<"First Name Registered!\n";
cout<<"Remember your characters name is "<< strlen ( name ) <<" letters long\n";
cout<<"Enter a last name for your FF character : ";
cin.getline ( lastname, 20 );
fullname[0] = '\0';
strcat ( fullname, name );
strcat ( fullname, " " );
strcat ( fullname, lastname );
cout<<"Your characters full name is: " << fullname <<"\n";
cout <<"-----------------------------------"
<< endl;
cout <<"How old is your FF character? ";
cout <<"Choose between ages, [1] - [100]: \n";
cin >> age;
cin.ignore();
cout << "Your character is " << age << " years old.... Brilliant age. " << fullname
<< endl;
cout <<"===================================================\n";
cout << fullname << " What Gender is the character....... 1 for [Boy], 2 for [Girl] ?\n";
cin >> gender;
if ( gender == 1 ) {
cout << "You're Male";
}
else if ( gender == 2 ) {
cout <<"You're Female";
}
else {
cout <<"Choose Male or Female\n";
}
cout <<"\n======================================"
<< endl;
cout << fullname << "Get ready to start your new adventure. You find new friends, \n\ and face great battles, you will meet rivals and allies. Be prepared. Good luck!";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Starting Game.....=========================";
cout <<"\n\Mom Says: " << name << "Clean your room and set your clock, its important to know what time it is";
cout <<"\n" << fullname << " says:Alright Mom.";
cout <<"\n What time is it --- ONLY ENTER A 1 DIGIT NUMBER PLEASE :";
cin >> time;
cout << "\n Clock Set to: " << time << "PM";
if ( time < 6 ) {
cout << "\nDo you want to go to The Temple of Irisid: ";
}
else if ( time > 12 ) {
cout << "Do you want to read a book ?";
}
cin >> house;
getchar();
cin.get();
}
"
#include <cstring>
//Author and Copyright: Mohammad Nashir
// http://mohammadnashir.blogspot.com/
using namespace std;
int main()
{
int age;
int gender;
int time;
int house;
char name[20];
char lastname[20];
char fullname[50];
cout << "Welcome to Mohammad's Game - Spicy Life. Please Enter a Name for your Final Fantasy Character Below: " << endl;
cout << "First Name" << endl;
cin.getline ( name, 20 );
if ( strcmp ( name, "Rikku" ) == 0 )
cout <<"First Name Registered!\n";
else
cout <<"First Name Registered!\n";
cout<<"Remember your characters name is "<< strlen ( name ) <<" letters long\n";
cout<<"Enter a last name for your FF character : ";
cin.getline ( lastname, 20 );
fullname[0] = '\0';
strcat ( fullname, name );
strcat ( fullname, " " );
strcat ( fullname, lastname );
cout<<"Your characters full name is: " << fullname <<"\n";
cout <<"-----------------------------------"
<< endl;
cout <<"How old is your FF character? ";
cout <<"Choose between ages, [1] - [100]: \n";
cin >> age;
cin.ignore();
cout << "Your character is " << age << " years old.... Brilliant age. " << fullname
<< endl;
cout <<"===================================================\n";
cout << fullname << " What Gender is the character....... 1 for [Boy], 2 for [Girl] ?\n";
cin >> gender;
if ( gender == 1 ) {
cout << "You're Male";
}
else if ( gender == 2 ) {
cout <<"You're Female";
}
else {
cout <<"Choose Male or Female\n";
}
cout <<"\n======================================"
<< endl;
cout << fullname << "Get ready to start your new adventure. You find new friends, \n\ and face great battles, you will meet rivals and allies. Be prepared. Good luck!";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Loading.....=========================";
cout <<"\n========================Starting Game.....=========================";
cout <<"\n\Mom Says: " << name << "Clean your room and set your clock, its important to know what time it is";
cout <<"\n" << fullname << " says:Alright Mom.";
cout <<"\n What time is it --- ONLY ENTER A 1 DIGIT NUMBER PLEASE :";
cin >> time;
cout << "\n Clock Set to: " << time << "PM";
if ( time < 6 ) {
cout << "\nDo you want to go to The Temple of Irisid: ";
}
else if ( time > 12 ) {
cout << "Do you want to read a book ?";
}
cin >> house;
getchar();
cin.get();
}
"
No comments:
Post a Comment