Thursday, August 15, 2013

Condominium Conditions(allows dogs)

#include <iostream>
#include <string>
using namespace std;

int main()

 //declare variables

 string dogName;
 string userSName;
 string dogSBreed;
 int gotDog;
 int limitSize=30;
 double dogSSize;

 //profesor remember the loop just work for user choice 1 or 2, and i m going to comment it just if you want to prove it undo that, thanks.
 //input user's name and save it into a variable.
 cout<<'\t'<<'\t'<<'\t'<<"Please, enter your name:"<<endl;

 //declaration statement.
   cout<<'\t'<<'\t'<<'\t'<<"Do you own a dog at the present time?"<<'\n';
   cout<<'\t'<<'\t'<<"1.If you own one."<<'\n';
   cout<<'\t'<<'\t'<<"2.If you don't own one."<<endl;

   //enter validation for user choice.

   //declare condition for user choice.
   if (gotDog>2||gotDog<1)
    //display error message for bad input.
   { cout<<'\t'<<'\t'<<'\t'<<"Bad Choice Selection!!!!"<<'\n';
     cout<<'\t'<<'\t'<<"  "<<"Please your choice must be 1 or 2."<<endl;
   //declare condition for user choice.
   else if (gotDog==2)
  //display acceptance message.
 '\t'<<'\t'<<"Welcome to our condominum:"<<" "<<userSName<<endl;


    cout<<'\t'<<'\t'<<'\t'<<"Please enter your dog's breed:"<<endl;
    //declare condition for dog 's breed.
     if (dogSBreed=="pit-bull")
  //display condition message
  cout<<'\t'<<'\t'<<"Sorry, but you aren't welcome in the condominum"<<'\n'<<
  '\t'<<'\t'<<"since pitbulls are illigal in Miami Dade County."<<endl;

     //declare input dog size.
     cout<<'\t'<<'\t'<<'\t'<<"Please enter the size of your dog:"<<endl;

     //declare condition for dog size
     //display condition message for dog's size
     cout<<'\t'<<'\t'<<'\t'<<"Sorry but your dog exceeds the limit"<<'\n';
     cout<<'\t'<<'\t'<<'\t'<<"size for the tenants rules. "<<endl;

    //input dog's name.
   cout<<'\t'<<'\t'<<'\t'<<"What 's your dog name:"<<'\n';
   //display user's name and dog's name.
   cout<<'\t'<<'\t'<<'\t'<<"Wellcome to our condominium:"<<'\n'<<
    '\t'<<'\t'<<'\t'<<userSName<<" "<<"and"<<"  "<<dogName<<endl;

    //erase the system and does loop
 //while(gotDog==1|| gotDog==2);

 return 0;


No comments:

Post a Comment