100% found this document useful (2 votes)
20 views61 pages

Engineering Problem Solving With C++ 4th Edition Etter Solutions Manual Download

The document provides links to various solutions manuals and test banks for C++ programming textbooks, including 'Engineering Problem Solving With C++ 4th Edition' and others. It also contains programming problems and examples related to prime number generation, file handling, and coin tossing simulations. Additionally, it includes code snippets demonstrating the implementation of these problems in C++.

Uploaded by

leemaruvilla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
20 views61 pages

Engineering Problem Solving With C++ 4th Edition Etter Solutions Manual Download

The document provides links to various solutions manuals and test banks for C++ programming textbooks, including 'Engineering Problem Solving With C++ 4th Edition' and others. It also contains programming problems and examples related to prime number generation, file handling, and coin tossing simulations. Additionally, it includes code snippets demonstrating the implementation of these problems in C++.

Uploaded by

leemaruvilla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Engineering Problem Solving With C++ 4th Edition

Etter Solutions Manual install download

https://testbankfan.com/product/engineering-problem-solving-
with-c-4th-edition-etter-solutions-manual/

Download more testbank from https://testbankfan.com


We believe these products will be a great fit for you. Click
the link to download now, or visit testbankfan.com
to discover even more!

Engineering Problem Solving With C++ 4th Edition Etter


Test Bank

https://testbankfan.com/product/engineering-problem-solving-
with-c-4th-edition-etter-test-bank/

Problem Solving with C++ 10th Edition Savitch Solutions


Manual

https://testbankfan.com/product/problem-solving-with-c-10th-
edition-savitch-solutions-manual/

Problem Solving with C++ 9th Edition Savitch Solutions


Manual

https://testbankfan.com/product/problem-solving-with-c-9th-
edition-savitch-solutions-manual/

Problem Solving with C++ 9th Edition Savitch Test Bank

https://testbankfan.com/product/problem-solving-with-c-9th-
edition-savitch-test-bank/
Problem Solving with C++ 10th Edition Savitch Test Bank

https://testbankfan.com/product/problem-solving-with-c-10th-
edition-savitch-test-bank/

Data Abstraction And Problem Solving With C++ Walls And


Mirrors 6th Edition Carrano Solutions Manual

https://testbankfan.com/product/data-abstraction-and-problem-
solving-with-c-walls-and-mirrors-6th-edition-carrano-solutions-
manual/

Data Abstraction and Problem Solving with C++ Walls and


Mirrors 7th Edition Carrano Solutions Manual

https://testbankfan.com/product/data-abstraction-and-problem-
solving-with-c-walls-and-mirrors-7th-edition-carrano-solutions-
manual/

Engineering Fundamentals and Problem Solving 7th


Edition Eide Solutions Manual

https://testbankfan.com/product/engineering-fundamentals-and-
problem-solving-7th-edition-eide-solutions-manual/

Data Abstraction And Problem Solving With C++ Walls And


Mirrors 6th Edition Carrano Test Bank

https://testbankfan.com/product/data-abstraction-and-problem-
solving-with-c-walls-and-mirrors-6th-edition-carrano-test-bank/
Exam Practice!
True/False Problems
1. T
2. F
3. T
4. T
5. F
6. T
7. T
Multiple Choice Problems
8. (b)
9. (a)
10. (d)
Program Analysis
11. 1
12. 0
13. 0
14. Results using negative integers may not be as expected.
Memory Snapshot Problems
15. v1-> [double x->1 double y->1 double orientation->3.1415]
v2-> [double x->1 double y->1 double orientation->3.1415]
16. v1-> [double x->0.0 double y->0.0 double orientation->0.0]
v2-> [double x->1 double y->1 double orientation->3.1415]
17. v1-> [double x->2.1 double y->3.0 double orientation->1.6]
v2-> [double x->2.1 double y->3.0 double orientation->1.6]
Programming Problems
/*--------------------------------------------------------------------*/
/* Problem chapter6_18 */
/* */
/* This program calls a function that detects and prints the first */
/* n prime integers, where n is an integer input to the function. */

#include <iostream>
using namespace std;

void primeGen(int n);

int main()
{
/* Declare and initialize variables. */
int input;

/* Prompt user for number of prime numbers. */


cout << "\nEnter number of primes you would like: ";
cin >> input;

/* Call the function. */


primeGen(input);

return 0;

}
/*--------------------------------------------------------------------*/
/* Function to calculate prime numbers. */
void primeGen(int n){

/* Declare variables. */

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


int i,j;
bool prime;

/* Print header information. */


cout << "Prime Numbers between 1 and " << n << endl;

for (i=1;i<=n;i++){
prime=true;
for (j=2;j<i;j++){
if (!(i%j)) {
prime=false;
}
}
/* Output number if it is prime. */
if (prime)
cout << i << endl;
}
return;
}
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_19 */
/* */
/* This program calls a function that detects and prints the first */
/* n prime integers, where n is an integer input to the function. */
/* The values are printed to a designated output file. */

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

void primeGen(int n, ofstream& file);

int main()
{
/* Declare and initialize variables */
int input;
ofstream outfile;
string filename;

/* Prompt user for number of prime numbers. */


cout << "\nEnter number of primes you would like: ";
cin >> input;

/* Prompt user for the name of the output file. */


cout << "\nEnter output file name: ";
cin >> filename;

outfile.open(filename.c_str());
if (outfile.fail()) {
cerr << "The output file " << filename << " failed to open.\n";
exit(1);
}

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


/* Call the function. */
primeGen(input, outfile);

outfile.close();

return 0;

}
/*--------------------------------------------------------------------*/
/* Function to calculate prime numbers. */
void primeGen(int n, ofstream& out){

/* Declare variables. */
int i,j;
bool prime;

/* Print header information. */


out << "Prime Numbers between 1 and " << n << endl;

for (i=1;i<=n;i++){
prime=true;
for (j=2;j<i;j++){
if (!(i%j)) {
prime=false;
}
}
/* Output number if it is prime. */
if (prime)
out << i << endl;
}
return;
}
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_20 */
/* */
/* This program calls a function that counts the integers in a file */
/* until a non-integer value is found. An error message is printed */
/* if non-integer values are found. */

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int countInts(ifstream& file);

int main()
{
/* Declare and initialize variables */
ifstream infile;
string filename;
int numInts;

/* Prompt user for the name of the input file. */

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


cout << "\nEnter input file name: ";
cin >> filename;

infile.open(filename.c_str());
if (infile.fail()) {
cerr << "The input file " << filename << " failed to open.\n";
exit(1);
}

/* Call the function. */


numInts = countInts(infile);

/* Print the number of integers. */


cout << numInts << " integers are in the file " << filename << endl;

infile.close();

return 0;

}
/*--------------------------------------------------------------------*/
/* Function to count integers. */
int countInts(ifstream& in){

/* Declare and initialize variables. */


int count(0), num;

in >> num;
while (!in.eof()) {
if (!in) {
cerr << "Encountered a non-integer value." << endl;
break;
} else {
count++;
}
in >> num;
}

return count;
}
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_21 */
/* */
/* This program calls a function that prints the values of the state */
/* flags of a file stream, which is passed to the function as an */
/* argument. */

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

void printFlags(ifstream& file);

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


int main()
{
/* Declare and initialize variables */
ifstream infile;
string filename;

/* Prompt user for the name of the input file. */


cout << "\nEnter input file name: ";
cin >> filename;

infile.open(filename.c_str());
if (infile.fail()) {
cerr << "The input file " << filename << " failed to open.\n";
exit(1);
}

/* Call the function. */


printFlags(infile);

infile.close();

return 0;

}
/*--------------------------------------------------------------------*/
/* Function to count integers. */
void printFlags(ifstream& in){

cout << "Badbit: " << in.bad() << endl;

cout << "Failbit: " << in.fail() << endl;

cout << "Eofbit: " << in.eof() << endl;

cout << "Goodbit: " << in.good() << endl;

return;
}
/*--------------------------------------------------------------------*/
Simple Simulations
/*--------------------------------------------------------------------*/
/* Problem chapter6_22 */
/* */
/* This program simulates tossing a "fair" coin. */
/* The user enters the number of tosses. */

#include <iostream>
#include <cstdlib>

using namespace std;

int rand_int(int a, int b);

const int HEADS = 1;


const int TAILS = 0;

int main()

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


{
/* Declare and initialize variables */
/* and declare function prototypes. */
int tosses=0, heads=0, required=0;

/* Prompt user for number of tosses. */


cout << "\n\nEnter number of fair coin tosses: ";
cin >> required;
while (required <= 0)
{
cout << "Tosses must be an integer number, greater than zero.\n\n";
cout << "Enter number of fair coin tosses: ";
cin >> required;
}

/* Toss coin the required number of times, and keep track of */


/* the number of heads. Use rand_int for the "toss" and */
/* and consider a positive number to be "heads." */
while (tosses < required)
{
tosses++;
if (rand_int(TAILS,HEADS) == HEADS)
heads++;
}

/* Print results. */
cout << "\n\nNumber of tosses: " << tosses << endl;
cout << "Number of heads: "<< heads << endl;
cout << "Number of tails: " << tosses-heads << endl;
cout << "Percentage of heads: " << 100.0 * heads/tosses << endl;
cout << "Percentage of tails: " << 100.0 * (tosses-heads)/tosses << endl;

/* Exit program. */
return 0;
}
/*--------------------------------------------------------------------*/
/* (rand_int function from page 257) */
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_23 */
/* */
/* This program simulates tossing an "unfair" coin. */
/* The user enters the number of tosses. */

#include <iostream>
#include <cstdlib>

using namespace std;

const int HEADS = 10;


const int TAILS = 1;
const int WEIGHT = 6;

int main()
{
/* Declare variables and function prototypes. */

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


int tosses=0, heads=0, required=0;
int rand_int(int a, int b);

/* Prompt user for number of tosses. */


cout << "\n\nEnter number of unfair coin tosses: ";
cin >> required;

/* Toss coin the required number of times, and */


/* keep track of the number of heads. */
while (tosses < required)
{
tosses++;
if (rand_int(TAILS,HEADS) <= WEIGHT)
heads++;
}

/* Print results. */
cout << "\n\nNumber of tosses: " << tosses << endl;
cout << "Number of heads: " << heads << endl;
cout << "Number of tails: " << tosses-heads << endl;
cout << "Percentage of heads: " << 100.0 * heads/tosses << endl;
cout << "Percentage of tails: " << 100.0 * (tosses-heads)/tosses <<
endl;

/* Exit program. */
return 0;
}
/*------------------------------------------------------------------*/
/* (rand_int function from page 257) */
/*------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
/* Problem chapter6_24 */
/* */
/* This program simulates tossing a "fair" coin using Coin class. */
/* The user enters the number of tosses. */

#include <iostream>
#include <cstdlib>
#include "Coin.h"
using namespace std;

int main()
{
/* Declare and initialize variables */
/* and declare function prototypes. */
int tosses=0, heads=0, required=0;
int seed;
/* Prompt user for number of tosses. */
cout << "\n\nEnter number of fair coin tosses: ";
cin >> required;
while (required <= 0)
{
cout << "Tosses must be an integer number, greater than zero.\n\n";
cout << "Enter number of fair coin tosses: ";
cin >> required;
}

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


/* Toss coin the required number of times, and keep track of */
/* the number of heads. Use rand_int for the "toss" and */
/* and consider a positive number to be "heads." */
cout << "enter a seed..";
cin >> seed;
srand(seed);
while (tosses < required)
{
tosses++;
Coin c1;
if (c1.getFaceValue() == Coin::HEADS)
heads++;
}

/* Print results. */
cout << "\n\nNumber of tosses: " << tosses << endl;
cout << "Number of heads: "<< heads << endl;
cout << "Number of tails: " << tosses-heads << endl;
cout << "Percentage of heads: " << 100.0 * heads/tosses << endl;
cout << "Percentage of tails: " << 100.0 * (tosses-heads)/tosses << endl;

/* Exit program. */
return 0;
}
/*--------------------------------------------------------------------*/

/*---------------------------------------------------*
/* Definition of a Coin class */
/* Coin.h
#include <iostream>
#include <cstdlib> //required for rand()
using namespace std;
int rand_int(int a, int b);
class Coin
{
private:
char faceValue;
public:
static const int HEADS = 'H';
static const int TAILS = 'T';

//Constructors
Coin() {int randomInt = rand_int(0,1);
if(randomInt == 1)
faceValue = HEADS;
else
faceValue = TAILS;}

//Accessors
char getFaceValue() const {return faceValue;}
//Mutators
//Coins are not mutable
};
/*----------------------------------------------------*/
/* This function generates a random integer */
/* between specified limits a and b (a<b). */
int rand_int(int a, int b)

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


{
return rand()%(b-a+1) + a;
}
/*----------------------------------------------------*/

/*------------------------------------------------------------------*/
/* Problem chapter6_25 */
/* */
/* This program simulates rolling a six-sided "fair" die. */
/* The user enter the number of rolls. */

#include <iostream>
#include <cstdlib>

using namespace std;

int rand_int(int a, int b);


const int MIN = 1;
const int MAX = 6;

int main()
{
/* Declare variables and function prototypes. */
int onedot=0, twodots=0, threedots=0, fourdots=0, fivedots=0,
sixdots=0, rolls=0, required=0;

/* Prompt user for number of rolls. */


cout << "\n\nEnter number of fair die rolls: ";
cin >> required;

/* Roll the die as many times as required */


while (rolls < required)
{
rolls++;
switch(rand_int(MIN,MAX))
{
case 1: onedot++;
break;
case 2: twodots++;
break;
case 3: threedots++;
break;
case 4: fourdots++;
break;
case 5: fivedots++;
break;
case 6: sixdots++;
break;
default:
cout << "\nDie roll result out of range!\n";
exit(1);
break;
}
}

/* Print the results. */


cout << "\nNumber of rolls: " << rolls << endl;

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


cout << "Number of ones: " << onedot << " percentage: "
<< 100.0*onedot/rolls << endl;
cout << "Number of twos: " << twodots << " percentage: "
<< 100.0*twodots/rolls << endl;
cout << "Number of threes: " << threedots << " percentage: "
<< 100.0*threedots/rolls << endl;
cout << "Number of fours: " << fourdots << " percentage: "
<< 100.0*fourdots/rolls << endl;
cout << "Number of fives: " << fivedots << " percentage: "
<< 100.0*fivedots/rolls << endl;
cout << "Number of sixes: " << sixdots << " percentage: "
<< 100.0*sixdots/rolls << endl;
/* Exit program. */
return 0;
}
/*------------------------------------------------------------------*/
/* (rand_int function from page 257) */
/*------------------------------------------------------------------*/

/*------------------------------------------------------------------*/
/* Problem chapter6_26 */
/* */
/* This program simulates an experiment rolling two six-sided */
/* "fair" dice. The user enters the number of rolls. */

#include <iostream>
#include <cstdlib>

using namespace std;

const int MAX = 6;


const int MIN = 1;
const int TOTAL = 8;

int rand_int(int a, int b);

int main()
{
/* Declare variables. */
int rolls=0, die1, die2, required=0, sum=0;

/* Prompt user for number of rolls. */


cout << "\n\nEnter number of fair dice rolls: ";
cin >> required;

/* Roll the die as many times as required. */


while (rolls < required)
{
rolls++;
die1=rand_int(MIN,MAX);
die2=rand_int(MIN,MAX);
if (die1+die2 == TOTAL)
sum++;
cout << "Results: " << die1 << " " << die2 << endl;
}

/* Print the results. */

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


cout << "\nNumber of rolls: " << rolls << endl;
cout << "Number of " << TOTAL << "s: " << sum << endl;
cout << "Percentage of " << TOTAL << "s: " << 100.0*sum/rolls << endl;

/* Exit program. */
return 0;
}
/*------------------------------------------------------------------*/
/* (rand_int function from text) */
/*------------------------------------------------------------------*/

/*------------------------------------------------------------------*/
/* Problem chapter6_27 */
/* */
/* This program simulates a lottery drawing that uses balls */
/* numbered from 1 to 10. */

#include <iostream>
#include <cstdlib>

using namespace std;

const int MIN = 1;


const int MAX = 10;
const int NUMBER = 7;
const int NUM_BALLS = 3;

int rand_int(int a, int b);


int main()
{
/* Define variables. */
unsigned int alleven = 0, num_in_sim = 0, onetwothree = 0, first,
second, third;
int lotteries = 0, required = 0;

/* Prompt user for the number of lotteries. */


cout << "\n\nEnter number of lotteries: ";
cin >> required;
while (required <= 0)
{
cout << "The number of lotteries must be an integer number, "
<< "greater than zero.\n\n";
cout << "Enter number of lotteries: ";
cin >> required;
}

/* Get three lottery balls, check for even or odd, and NUMBER. */
/* Also check for the 1-2-3 sequence and its permutations. */
while (lotteries < required)
{
lotteries++;

/* Draw three unique balls. */


first = rand_int(MIN,MAX);
do
second = rand_int(MIN,MAX);
while (second == first);

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


do
third = rand_int(MIN,MAX);
while ((second==third) || (first==third));

cout << "Lottery number is: " << first << "-" << second
<< "-" << third << endl;

/* Are they all even? */


if ((first % 2 == 0) && (second % 2 == 0) && (third %2 == 0))
alleven++;

/* Are any of them equal to NUMBER? */


if ((first == NUMBER) || (second==NUMBER) || (third == NUMBER))
num_in_sim++;

/* Are they 1-2-3 in any order? */


if ((first <= 3) && (second <= 3) && (third <= 3))
if ((first != second) && (first != third) && (second != third))
onetwothree++;
}

/* Print results. */
cout << "\nPercentage of time the result contains three even numbers:"
<< 100.0*alleven/lotteries << endl;
cout << "Percentage of time the number " << NUMBER << " occurs in the"
" three numbers: " << 100.0*num_in_sim/lotteries << endl;
cout << "Percentage of time the numbers 1,2,3 occur (not necessarily"
" in order): " << 100.0*onetwothree/lotteries << endl;

/* Exit program. */
return 0;

}
/*--------------------------------------------------------------------*/
/* (rand_int function from page 257) */
/*--------------------------------------------------------------------*/
Component Reliability
/*--------------------------------------------------------------------*/
/* Problem chapter6_28 */
/* */
/* This program simulates the design in Figure 6-17 using a */
/* component reliability of 0.8 for component 1, 0.85 for */
/* component 2 and 0.95 for component 3. The estimate of the */
/* reliability is computed using 5000 simulations. */
/* (The analytical reliability of this system is 0.794.) */

#include <iostream>
#include <cstdlib>

using namespace std;

const int SIMULATIONS = 5000;


const double REL1 = 0.8;
const double REL2 = 0.85;
const double REL3 = 0.95;
const int MIN_REL = 0;
const int MAX_REL = 1;

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


double rand_float(double a, double b);
int main()
{
/* Define variables. */
int num_sim=0, success=0;
double est1, est2, est3;

/* Run simulations. */
for (num_sim=0; num_sim<SIMULATIONS; num_sim++)
{
/* Get the random numbers */
est1 = rand_float(MIN_REL,MAX_REL);
est2 = rand_float(MIN_REL,MAX_REL);
est3 = rand_float(MIN_REL,MAX_REL);

/* Now test the configuration */


if ((est1<=REL1) && ((est2<=REL2) || (est3<=REL3)))
success++;
}

/* Print results. */
cout << "Simulation Reliability for " << num_sim << " trials: "
<< (double)success/num_sim << endl;

/* Exit program. */
return 0;
}
/*-------------------------------------------------------------------*/
/* (rand_float function from page 257) */
/*-------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_29 */
/* */
/* This program simulates the design in Figure 6.18 using a */
/* component reliability of 0.8 for components 1 and 2, */
/* and 0.95 for components 3 and 4. Print the estimate of the */
/* reliability using 5000 simulations. */
/* (The analytical reliability of this system is 0.9649.) */

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

const int SIMULATIONS = 5000;


const double REL12 = 0.8;
const double REL34 = 0.95;
const int MIN_REL = 0;
const int MAX_REL = 1;

double rand_float(double a, double b);

int main()
{
/* Define variables. */
int num_sim=0, success=0;

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


double est1, est2, est3, est4;

/* Run simulations. */
for (num_sim=0; num_sim<SIMULATIONS; num_sim++)
{
/* Get the random numbers. */
est1 = rand_float(MIN_REL,MAX_REL);
est2 = rand_float(MIN_REL,MAX_REL);
est3 = rand_float(MIN_REL,MAX_REL);
est4 = rand_float(MIN_REL,MAX_REL);

/* Now test the configuration. */


if (((est1<=REL12) && (est2<=REL12)) ||
((est3<=REL34) && (est4<=REL34)))
success++;
}

/* Print results. */
cout << "Simulation Reliability for " << num_sim << " trials: "
<< (double)success/num_sim << endl;

/* Exit program. */
return 0;
}
/*--------------------------------------------------------------------*/
/* (rand_float function from page 257) */
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_30 */
/* */
/* This program simulates the design in Figure 6.19 using a */
/* component reliability of 0.95 for all components. Print the */
/* estimate of the reliability using 5000 simulations. */
/* (The analytical reliability of this system is 0.99976.) */

#include <iostream>
#include <cstdlib>

using namespace std;

const int SIMULATIONS = 5000;


const double REL = 0.95;
const int MIN_REL = 0;
const int MAX_REL = 1;

double rand_float(double a, double b);

int main()
{
/* Define variables. */
int num_sim=0, success=0;
double est1, est2, est3, est4;

/* Run simulations. */

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


for (num_sim=0; num_sim<SIMULATIONS; num_sim++)
{
/* Get the random numbers. */
est1 = rand_float(MIN_REL,MAX_REL);
est2 = rand_float(MIN_REL,MAX_REL);
est3 = rand_float(MIN_REL,MAX_REL);
est4 = rand_float(MIN_REL,MAX_REL);

/* Now test the configuration. */


if (((est1<=REL) || (est2<=REL)) || ((est3<=REL) && (est4<=REL)))
success++;
}

/* Print results. */
cout << "Simulation Reliability for " << num_sim << " trials: "
<< (double)success/num_sim << endl;

/* Exit program. */
return 0;
}
/*--------------------------------------------------------------------*/
/* (rand_float function from page 257) */
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_31 */
/* */
/* This program generates a data file named wind.dat that */
/* contains one hour of simulated wind speeds. */

#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>

using namespace std;

const int DELTA_TIME = 10;


const int START_TIME = 0;
const int STOP_TIME = 3600;
const string FILENAME = "wind.dat";

double rand_float(double a, double b);

int main()
{
/* Define variables. */
int timer=START_TIME;
double ave_wind=0.0, gust_min=0.0, gust_max=0.0, windspeed=0.0;
ofstream wind_data;

/* Open output file. */


wind_data.open(FILENAME.c_str());

/* Prompt user for input and verify. */


cout << "Enter average wind speed: ";
cin >> ave_wind;

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


cout << "Enter minimum gust: ";
cin >> gust_min;
cout << "Enter maximum gust (> minimum gust): ";
cin >> gust_max;

for (timer=START_TIME; timer<=STOP_TIME; timer+=DELTA_TIME)


{
windspeed = rand_float(ave_wind+gust_min,ave_wind+gust_max);
wind_data << timer << ' ' << windspeed << endl;
}

/* Close file and exit program. */


wind_data.close();
return 0;
}
/*--------------------------------------------------------------------*/
/* (rand_float function from page 257) */
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_32 */
/* */
/* This program generates flight simulator wind data with a */
/* 0.5% possiblity of encountering a small storm at each time step. */
/* The average wind speed is increased by 10 mph for 5 minutes when */
/* a storm is encountered. */

#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>

using namespace std;

const int DELTA_TIME = 10;


const int START_TIME = 0;
const int STOP_TIME = 3600;
const string FILENAME = "wind.dat";
const int STORM_WIND = 10;
const int MIN_PROB = 0;
const int MAX_PROB = 1;
const double STORM_PROB = 0.005;
const int STORM = 1;
const int NO_STORM = 0;
const int MAX_DURATION = 300;

double rand_float(double a, double b);

int main()
{
/* Define variables. */
double ave_wind=0.0, gust_min=0.0, gust_max=0.0, windspeed = 0.0;
int timer=START_TIME, storm_duration=0, storm_flag=NO_STORM;
ofstream wind_data;

/* Open file for writing */


wind_data.open(FILENAME.c_str());

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


/* Prompt user for input and verify */
cout << "Enter average wind speed: ";
cin >> ave_wind;
cout << "Enter minimum gust: ";
cin >> gust_min;
cout << "Enter maximum gust (>minimum): ";
cin >> gust_max;

/* Compute wind speeds. */


for (timer=START_TIME; timer<=STOP_TIME; timer+=DELTA_TIME)
{
if (storm_flag == STORM)
/* There is a storm, is it time to stop? */
if (storm_duration < MAX_DURATION)
storm_duration += DELTA_TIME;
else
storm_flag = NO_STORM;
else
/* No storm raging, is it time for another? */
if (rand_float(MIN_PROB,MAX_PROB) <= STORM_PROB)
{
storm_flag = STORM;
storm_duration = 0;
}

windspeed = rand_float(ave_wind+gust_min,ave_wind+gust_max);

if (storm_flag == STORM)
windspeed += STORM_WIND;

wind_data << timer << ' ' << windspeed << endl;
}

/* Close file and exit program. */


wind_data.close();
return 0;
}
/*--------------------------------------------------------------------*/
/* (rand_float function from page 257) */
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_33 */
/* */
/* This program generates flight simulator wind data with a */
/* 0.5% possiblity of encountering a small storm at each time step. */
/* The average wind speed is increased by 10 mph for 5 minutes when */
/* a storm is encountered. During a small storm, there is a 1% */
/* chance of encountering a microbust at each time step. The wind */
/* is increased by 50mph for 1 minute when a microburst occurs. */

#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


using namespace std;

const int DELTA_TIME = 10;


const int START_TIME = 0;
const int STOP_TIME = 3600;
const string FILENAME = "wind.dat";
const int STORM_WIND = 10;
const int BURST_WIND = 50;
const int MIN_PROB = 0;
const int MAX_PROB = 1;
const double STORM_PROB = 0.005;
const int STORM_TIME = 300;
const double BURST_PROB = 0.01;
const int BURST_TIME = 60;

double rand_float(double a, double b);

int main()
{
/* Define variables. */
double ave_wind=0.0, gust_min=0.0, gust_max=0.0, windspeed = 0.0;
int timer=START_TIME, storm_duration=0, burst_duration=0;
bool storm=false, burst=false;
ofstream wind_data;

/* Open file for writing */


wind_data.open(FILENAME.c_str());

/* Prompt user for input and verify */


cout << "Enter average wind speed: ";
cin >> ave_wind;
cout << "Enter minimum gust: ";
cin >> gust_min;
cout << "Enter maximum gust (>minimum): ";
cin >> gust_max;

/* Compute wind speeds. */


for (timer=START_TIME; timer<=STOP_TIME; timer+=DELTA_TIME)
{
if (storm)
/* There is a storm, is it time to stop? */
if (storm_duration < STORM_TIME) {
storm_duration += DELTA_TIME;
/* Is there a burst? */
if (burst)
/* burst in progress */
if (burst_duration < BURST_TIME)
burst_duration +=DELTA_TIME;
else
burst=false;
else
/* no burst, but is it time for one? */
if (rand_float(MIN_PROB,MAX_PROB) <= BURST_PROB) {
/* Time for a burst! */
burst=true;
burst_duration=0;
}

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


} else {
storm=false;
burst=false;
}
else
/* No storm raging, is it time for another? */
if (rand_float(MIN_PROB,MAX_PROB) <= STORM_PROB)
{
storm = true;
storm_duration = 0;
if (rand_float(MIN_PROB,MAX_PROB) <= BURST_PROB) {
/* Time for a burst! */
burst=true;
burst_duration=0;
}

windspeed = rand_float(ave_wind+gust_min,ave_wind+gust_max);

if (storm){
windspeed += STORM_WIND;
if (burst)
windspeed += BURST_WIND;
}

wind_data << timer << ' ' << windspeed << endl;
}

/* Close file and exit program. */


wind_data.close();
return 0;
}
/*--------------------------------------------------------------------*/
/* (rand_float function from page 257) */
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_34 */
/* */
/* This program generates flight simulator wind data with a */
/* user-entered possiblity of encountering a small storm at each */
/* time step. The average wind speed is increased by 10 mph for 5 */
/* minutes when a storm is encountered. */

#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>

using namespace std;

const int DELTA_TIME = 10;


const int START_TIME = 0;
const int STOP_TIME = 3600;
const string FILENAME = "wind.dat";
const int STORM_WIND = 10;

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


const int MIN_PROB = 0;
const int MAX_PROB = 1;
const int STORM = 1;
const int NO_STORM = 0;
const int MAX_DURATION = 300;

double rand_float(double a, double b);

int main()
{
/* Define variables. */
double ave_wind=0.0, gust_min=0.0, gust_max=0.0, windspeed = 0.0;
double storm_prob;
int timer=START_TIME, storm_duration=0, storm_flag=NO_STORM;
ofstream wind_data;

/* Open file for writing */


wind_data.open(FILENAME.c_str());

/* Prompt user for input and verify */


cout << "Enter average wind speed: ";
cin >> ave_wind;
cout << "Enter minimum gust: ";
cin >> gust_min;
cout << "Enter maximum gust (>minimum): ";
cin >> gust_max;
cout << "Enter the probability of a storm: ";
cin >> storm_prob;

/* Compute wind speeds. */


for (timer=START_TIME; timer<=STOP_TIME; timer+=DELTA_TIME)
{
if (storm_flag == STORM)
/* There is a storm, is it time to stop? */
if (storm_duration < MAX_DURATION)
storm_duration += DELTA_TIME;
else
storm_flag = NO_STORM;
else
/* No storm raging, is it time for another? */
if (rand_float(MIN_PROB,MAX_PROB) <= storm_prob)
{
storm_flag = STORM;
storm_duration = 0;
}

windspeed = rand_float(ave_wind+gust_min,ave_wind+gust_max);

if (storm_flag == STORM)
windspeed += STORM_WIND;

wind_data << timer << ' ' << windspeed << endl;
}

/* Close file and exit program. */


wind_data.close();
return 0;

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


}
/*--------------------------------------------------------------------*/
/* (rand_float function from page 257) */
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_35 */
/* */
/* This program generates flight simulator wind data with a */
/* 0.5% possiblity of encountering a small storm at each time step. */
/* The average wind speed is increased by 10 mph for a user-entered */
/* duration when a storm is encountered. */

#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>

using namespace std;

const int DELTA_TIME = 10;


const int START_TIME = 0;
const int STOP_TIME = 3600;
const string FILENAME = "wind.dat";
const int STORM_WIND = 10;
const int MIN_PROB = 0;
const int MAX_PROB = 1;
const double STORM_PROB = 0.005;
const int STORM = 1;
const int NO_STORM = 0;

double rand_float(double a, double b);

int main()
{
/* Define variables. */
double ave_wind=0.0, gust_min=0.0, gust_max=0.0, windspeed = 0.0;
int max_storm_length = 300;
int timer=START_TIME, storm_duration=0, storm_flag=NO_STORM;
ofstream wind_data;

/* Open file for writing */


wind_data.open(FILENAME.c_str());

/* Prompt user for input and verify */


cout << "Enter average wind speed: ";
cin >> ave_wind;
cout << "Enter minimum gust: ";
cin >> gust_min;
cout << "Enter maximum gust (>minimum): ";
cin >> gust_max;
cout << "Enter the length of a storm: ";
cin >> max_storm_length;

/* Compute wind speeds. */


for (timer=START_TIME; timer<=STOP_TIME; timer+=DELTA_TIME)
{

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


if (storm_flag == STORM)
/* There is a storm, is it time to stop? */
if (storm_duration < max_storm_length)
storm_duration += DELTA_TIME;
else
storm_flag = NO_STORM;
else
/* No storm raging, is it time for another? */
if (rand_float(MIN_PROB,MAX_PROB) <= STORM_PROB)
{
storm_flag = STORM;
storm_duration = 0;
}

windspeed = rand_float(ave_wind+gust_min,ave_wind+gust_max);

if (storm_flag == STORM)
windspeed += STORM_WIND;

wind_data << timer << ' ' << windspeed << endl;
}

/* Close file and exit program. */


wind_data.close();
return 0;
}
/*--------------------------------------------------------------------*/
/* (rand_float function from page 257) */
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_36 */
/* */
/* This program generates flight simulator wind data with a */
/* 0.5% possiblity of encountering a small storm at each time step. */
/* The average wind speed is increased by 10 mph for a random */
/* duration between 3 and 5 minutes when a storm is encountered. */

#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>

using namespace std;

const int DELTA_TIME = 10;


const int START_TIME = 0;
const int STOP_TIME = 3600;
const string FILENAME = "wind.dat";
const int STORM_WIND = 10;
const int MIN_PROB = 0;
const int MAX_PROB = 1;
const double STORM_PROB = 0.005;
const int STORM = 1;
const int NO_STORM = 0;

double rand_float(double a, double b);

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


int rand_int(int a, int b);

int main()
{
/* Define variables. */
double ave_wind=0.0, gust_min=0.0, gust_max=0.0, windspeed = 0.0;
int max_storm_length;
int timer=START_TIME, storm_duration=0, storm_flag=NO_STORM;
ofstream wind_data;

/* Open file for writing */


wind_data.open(FILENAME.c_str());

/* Prompt user for input and verify */


cout << "Enter average wind speed: ";
cin >> ave_wind;
cout << "Enter minimum gust: ";
cin >> gust_min;
cout << "Enter maximum gust (>minimum): ";
cin >> gust_max;

/* Generate the length of the storm */


max_storm_length = rand_int(180,300);

/* Compute wind speeds. */


for (timer=START_TIME; timer<=STOP_TIME; timer+=DELTA_TIME)
{
if (storm_flag == STORM)
/* There is a storm, is it time to stop? */
if (storm_duration < max_storm_length)
storm_duration += DELTA_TIME;
else
storm_flag = NO_STORM;
else
/* No storm raging, is it time for another? */
if (rand_float(MIN_PROB,MAX_PROB) <= STORM_PROB)
{
storm_flag = STORM;
storm_duration = 0;
}

windspeed = rand_float(ave_wind+gust_min,ave_wind+gust_max);

if (storm_flag == STORM)
windspeed += STORM_WIND;

wind_data << timer << ' ' << windspeed << endl;
}

/* Close file and exit program. */


wind_data.close();
return 0;
}
/*--------------------------------------------------------------------*/
/* (rand_float function from page 259) */
/* (rand_int function from page 257) */
/*--------------------------------------------------------------------*/

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


Roots of Functions
/*--------------------------------------------------------------------*/
/* Problem chapter6_37 */
/* */
/* This program determines the real roots of a quadratic */
/* equation, assuming that the user enters the coefficients of */
/* the quadratic equation. */

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
/* Declare variables. */
double a, b, c, discriminant, root1,root2;

/* Prompt user for equation. */


cout << "Enter a,b,c for equation ax^2 + bx + c: ";
cin >> a >> b >> c;
cout << "Equation is: " << a << "x^2 + " << b << "x + "
<< c << " = y\n";

/* Are the roots complex? */


discriminant = b*b - 4*a*c;
if (discriminant < 0.0)
cout << "Complex roots!";
else
{
root1 = (-b + sqrt(discriminant)) / (2*a);
root2 = (-b - sqrt(discriminant)) / (2*a);
cout << "Roots are: x1=" << root1 << ", x2=" << root2 << endl;
}

/* Exit program. */
return 0;
}
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_38 */
/* */
/* This program determines the roots of a quadratic equation. */

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
/* Declare variables. */
double a, b, c, discriminant, root1, root2;

/* Prompt user for equation. */


cout << "Enter a,b,c for equation ax^2 + bx + c: ";

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


cin >> a >> b >> c;
cout << "Equation is: " << a << "x^2 + " << b << "x + "
<< c << " = y\n";

/* Are the roots complex? */


discriminant = b*b - 4*a*c;
if (discriminant < 0.0)
{
root1 = -b/(2*a);
root2 = sqrt(abs(discriminant))/(2*a);
cout << "Roots are: x1= " << root1 << " + i" << root2 << ", x2 = "
<< root1 << " -i" << root2 << endl;
}
else
{
root1 = (-b + sqrt(discriminant)) / (2*a);
root2 = (-b - sqrt(discriminant)) / (2*a);
cout << "Roots are: x1=" << root1 << ", x2=" << root2 << endl;
}

/* Exit program. */
return 0;
}
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_39 */
/* */
/* This program evaluates this mathematical function: */
/* f(x) = 0.1 x^2 - x ln x */

#include <iostream>
#include <cmath>

using namespace std;

void check_roots(double left, double right);


double f(double x);

int main()
{
/* Declare variables. */
int n, k;
double a, b, step, left, right;

/* Get user input. */


cout << "Enter interval limits a, b (a<b): \n";
cin >> a >> b;
cout << "Enter step size: \n";
cin >> step;

/* Check subintervals for roots. */


n = ceil((b - a)/step);
cout << "n is " << n << endl;
for (k=0; k<=n-1; k++)
{
left = a + k*step;

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


if (k == n-1)
right = b;
else
right = left + step;
check_roots(left,right);
}
check_roots(b,b);

/* Exit program. */
return 0;
}
/*--------------------------------------------------------------------*/
/* This function checks a subinterval for a root. */

void check_roots(double left, double right)


{
/* Declare variables and function prototypes. */
double f_left, f_right;
double f(double x);

/* Evaluate subinterval endpoints and test for roots. */


f_left = f(left);
f_right = f(right);
if (fabs(f_left) < 0.1e-04)
cout << "Root detected at " << left << endl;
else
if (!(fabs(f_right) < 0.1e-04))
if (f_left*f_right < 0)
cout << "Root detected at " << (left+right)/2 << endl;

/* Exit function. */
return;
}
/*--------------------------------------------------------------------*/
/* This functions evaluates a mathematical function given */
/* in problem 28. Be sure not to call with x < 0. */

double f(double x)
{
/* Return function value. */
return (0.1*x*x - x*log(x));
}
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_40 */
/* */
/* This program finds the roots of this function in a */
/* user-specified interval: f(x) = sinc(x) */

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

double sinc(double x);


void check_roots(double left, double right);

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


int main()
{
/* Declare variables. */
int n, k;
double a, b, step, left, right;

/* Get user input. */


cout << "Enter interval limits a, b (a<b): \n";
cin >> a >> b;
cout << "Enter step size: \n";
cin >> step;

/* Check subintervals for roots. */


n = ceil((b - a)/step);
for (k=0; k<=n-1; k++)
{
left = a + k*step;
if (k == n-1)
right = b;
else
right = left + step;
check_roots(left,right);
}
check_roots(b,b);

/* Exit program. */
return 0;
}
/*--------------------------------------------------------------------*/
/* This function checks a subinterval for a root. */

void check_roots(double left, double right)


{
/* Declare variables. */
double f_left, f_right;

/* Evaluate subinterval endpoints and */


/* test for roots. */
f_left = sinc(left);
f_right = sinc(right);
if (fabs(f_left) < 0.1e-04)
cout << "Root detected at " << left << endl;
else
if (!(fabs(f_right) < 0.1e-04))
if (f_left*f_right < 0)
cout << "Root detected at " << (left+right)/2 << endl;

/* Void return. */
return;
}
/*--------------------------------------------------------------------*/
/* This function evaluates a sinc function. */

double sinc(double x)
{
/* Return function value. */

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


if (x == 0)
return 1;
else
return sin(x)/x;
}
/*--------------------------------------------------------------------*/

/*--------------------------------------------------------------------*/
/* Problem chapter6_41 */
/* */
/* This program estimates the roots of a subinterval using this */
/* approximation: c = (a*f(b) - b*f(b)) / (f(b) - f(a)) */

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

void check_roots(double left, double right, double a0,


double a1, double a2, double a3);
double poly(double x, double a0, double a1,
double a2, double a3);

int main()
{

/* Declare variables. */
int n, k;
double a0, a1, a2, a3, a, b, step, left, right;

/* Get user input. */


cout << "Enter coefficients a0, a1, a2, a3: \n";
cin >> a0>> a1>> a2>> a3;
cout << "Enter interval limits a, b (a<b): \n";
cin >> a >> b;
cout << "Enter step size: \n";
cin >> step;

/* Check subintervals for roots. */


n = ceil((b - a)/step);
for (k=0; k<=n-1; k++)
{
left = a + k*step;
if (k == n-1)
right = b;
else
right = left + step;
check_roots(left,right,a0,a1,a2,a3);
}
check_roots(b,b,a0,a1,a2,a3);

/* Exit program. */
return 0;
}
/*--------------------------------------------------------------------*/
/* This function checks a subinterval for a root. */

void check_roots(double left, double right, double a0,

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


double a1, double a2, double a3)
{
/* Declare variables. */
double f_left, f_right,c;

/* Evaluate subinterval endpoints and test for roots. */


f_left = poly(left,a0,a1,a2,a3);
f_right = poly(right,a0,a1,a2,a3);

if (fabs(f_left) < 0.1e-04)


cout << "Root detected at " << left << endl;
else
if (!(fabs(f_right) < 0.1e-04))
if (f_left*f_right < 0) {
c = (left*f_right - right*f_left)/(f_right - f_left);
cout << "Root detected at " << c << endl;
}

/* Void return. */
return;
}
/*--------------------------------------------------------------------*/
/* (poly function from page 231) */
/*--------------------------------------------------------------------*/

/*-------------------------------------------------------------------------*/
/* Program chapter6_42 */
/* */
/* This program finds the real roots of a polynomial using the */
/* Newton-Raphson method using functions that evaluate the polynomial */
/* and its derivative. */

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

double polynomial(double a, double b, double c, double d, double x);


double derivative(double a, double b, double c, double d, double x);

int main()
{
// Declare objects.
int iterations=0;
double a0, a1, a2, a3, x, p, dp, tol;

// Get user input.


cout << "Enter coefficients a0, a1, a2, a3\n";
cin >> a0 >> a1 >> a2 >> a3;
cout << "Enter initial guess for root\n";
cin >> x;

// Evaluate p at initial guess.


p = polynomial(a0, a1, a2, a3, x);

// Determine tolerance.
tol = abs(p);
while(tol > 0.001 && iterations < 100)

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


{
// Calculate the derivative.
dp = derivative(a0, a1, a2, a0, x);

// Calculate next estimated root.


x = x - p/dp;

// Evaluate p at estimated root.


p = polynomial(a0, a1, a2, a3, x);
tol = abs(p);
iterations++;
}
if(tol < 0.001)
{
cout << "Root is " << x << endl
<< iterations << " iterations\n";
}
else
cout << "Did not converge after 100 iterations\n";
return 0;
}
/*-------------------------------------------------------------------------*/
/* This function calculates the value of a polynomial function given */
/* coefficients. */
double polynomial(double a, double b, double c, double d, double x)
{
return a*pow(x,3) + b*x*x + c*x + d;
}
/*-------------------------------------------------------------------------*/
/* This function calculates the derivative of a polynomial function */
/* given coefficients. */
double derivative(double a, double b, double c, double d, double x)
{
return 3*a*x*x + 2*b*x + c;
}
/*-------------------------------------------------------------------------*/

/*-------------------------------------------------------------------------*/
/* Program chapter6_43 */
/* */
/* This program estimates the area under a given curve */
/* using trapezoids with equal bases. */

#include <iostream>
#include <cmath>

using namespace std;

// Function prototypes.
double integrate(double a, double b, int n);
double f(double x);

int main()
{
// Declare objects
int num_trapezoids;
double a, b, area;

© 2017 Pearson Education, Inc. Hoboken, NJ. All rights reserved.


Exploring the Variety of Random
Documents with Different Content
CHAPTER XXIX.
A FRIEND IN NEED.

Virginia, in the solitude of the wigwam, full of bitter thoughts, and


mourning, silently, over the hard fortune that had befallen her, was
surprised by the entrance of a female form.
Looking up in astonishment, she beheld Kate.
A cry of joy came from the lips of the hopeless girl. In Kate she
beheld a friend!
A warning gesture from the Kanawha Queen checked Virginia’s
utterance, and the words of welcome died away upon her lips.
“Be careful, lady,” said Kate, warningly; “a loud word to betray to
other ears that we know each other, and both of us are lost.”
“Oh! it is so hard to keep back the joy that struggles to my lips,”
murmured Virginia; “your presence here seems like a ray of sunlight
beaming full upon the dark pathway through which runs the current
of my life. Your face gives me life and hope.”
Kate gazed into the upturned face of the fair girl with a mournful
smile.
“You are in great danger, lady,” she said, slowly.
“Oh, I know that!” cried Virginia, quickly. “I am a prisoner in the
hands of the merciless red-men.”
“Yes, a prisoner in the hands of one who is more merciless than any
painted savage that roams the valley of the Ohio. A man whose skin
is white but whose heart is red,” said Kate, mournfully.
Virginia gazed at Kate in wonder.
“In Heaven’s name, of whom do you speak?” she asked.
“Of one to whom the hungry wolf is a lamb; of one who knows
neither fear nor pity. A white Indian; an outcast from his country and
his race.”
Virginia shuddered at the terrible words.
“A renegade?”
“Yes; you are a prisoner in his hands, not the captive of the
Shawnees. Far better were it for you if the red Indians held your fate
in their hands,” Kate said, impressively.
“And the name of this man?”
“Simon Girty.”
Virginia’s heart sunk within her as the name of the dreaded
renegade fell upon her ears.
“Oh, Heaven help me, then!” she murmured, “for I am in terrible
peril.”
“Yes, you are right,” said Kate, quickly; “you are in peril. A miracle
alone can save you.”
“Where am I?” Virginia asked.
“In the village of Chillicothe.”
“Among the Shawnees!”
“Yes; this is the village of their great chief, Ke-ne-ha-ha.”
“I have heard my father speak of him,” Virginia said, thoughtfully.
“He bears a deadly hatred to the whites.”
“Yes; he has sworn to drive the pale-faces back from the Ohio. Even
now the savages are arming and preparing for the fight.”
“Then my father and friends will be in danger!” cried Virginia.
“What is their danger compared to yours?” asked Kate.
“Yes, that is true,” said Virginia, mournfully, “but, for the moment,
the thought of their peril made me forget my own helpless
situation.”
“Have you ever seen this man—Girty?”
“No.”
“You do not know, then, why he has selected you for his victim?”
“No,” again Virginia replied.
“Strange,” said Kate, thoughtfully. “I cannot understand it. He must
have some motive in entrapping you from your home and friends
and bringing you here.”
“I will tell you all the particulars.”
Then Virginia told the story of her abduction.
Kate listened attentively.
The story puzzled her. She could not understand the double
abduction.
“Have you no suspicion as to who this man is that pretended to
rescue you from your first captors, but in reality led you into the
hands of the second party?”
“No,” Virginia said.
“The false guide was Simon Girty.”
Virginia uttered a sharp cry as though she had received a terrible
wound.
“For Heaven’s sake be silent or it will cost us both our lives!” cried
Kate, quickly and with great caution.
“I will not offend again,” murmured Virginia, the big tears beginning
to well slowly from her lustrous brown eyes. “But I have such a
terrible weight pressing upon my heart. I feel that I am utterly lost.”
“No, do not despair; there may still be a chance to escape from the
toils that surround you.”
“Oh! show me some way to escape and I will go down on my knees
and thank you!” cried Virginia Treveling, earnestly.
“I do not ask that,” said Kate, with a mournful expression in her dark
eyes.
“But how is it that you are here in the Indian village? Are you a
prisoner, too?” asked Virginia, suddenly.
“No,” replied Kate, her eyes seeking the ground.
“I cannot understand,” said Virginia, in wonder.
“Do you not remember who and what I am?” asked Kate, a tinge of
bitterness perceptible in her tones. “Am I not Kate, the Queen of the
Kanawha, the daughter of the pale-faced Indian, David Kendrick, the
renegade?”
“Yes, yes, I remember now,” said Virginia: “I ask your pardon if my
question has given you pain. I did not intend or think to wound you.”
“Do not fear. I have heard too many bitter speeches in my short life
to be galled now by a chance word. I cannot be wounded by a
random shot. I am the daughter of a renegade; all the world knows
it. It would be useless to deny the truth. I must bear patiently the
stain that my birth and my father’s deeds have fixed upon me. I
cannot cast aside the shame that clings to me and through no act of
mine. All the world despises me. Is it not enough to make me hate
all the world?”
“No,” said Virginia, softly, “you are not to blame for the deeds of
others. Live so that your life shall be a telling reproof to those who
would blame you for the acts of your father. I do not think any the
worse of you because you are the daughter of David Kendrick, the
renegade. No, I rather pity you. I told you so when first we met in
the ravine near Point Pleasant, and I repeat the words, now that I
am here a captive in the hands of my enemies.”
“Oh, lady, you have the heart of an angel!” cried Kate earnestly.
“No, I am only a poor weak girl in deadly peril,” said Virginia, simply.
“Lady, I will try and save you from the danger that surrounds you!”
cried Kate, impulsively.
“You will?” murmured Virginia, her face lighting up with joy.
“Yes; can you guess why I am here?”
“No,” Virginia replied, in wonder.
“I am placed here by Girty to watch you.”
“To watch me?”
“Yes, so that you can not escape from the toils that his cunning has
drawn around you.”
“And you will break faith with him and save me?” asked Virginia,
anxiously.
“Yes.”
“Heaven will surely bless you for the act!” cried Virginia, quickly.
“Perhaps I may need that blessing,” said Kate, earnestly.
“I am sure that you do not!” exclaimed Virginia, impulsively. “I read
in your face that your heart is good and noble, and I am sure that
your face does not deceive me.”
“I will try and keep faith with you. I have promised one who loves
you dearly, that, if you were within a hundred miles of the Ohio,
neither swamp nor wood, house nor wigwam should hide you from
me. I have kept that promise and have found you. But one more
task remains for me to do and that is, to save you from the perils
that now surround you, and give you safe and unharmed into his
arms.”
Virginia listened with wonder to this strange speech.
“One who loves me dearly?”
“Yes, better far, I think, than he does his own life.”
“I can not understand,” said Virginia, bewildered.
“Is there not some one whom you love? One who holds your
plighted faith?” asked Kate.
“There was one,” and as Virginia spoke, the tears came slowly into
her eyes. Back to her memory came the scene in the ravine. In
imagination she felt again the warm, passionate kiss of the man she
loved so well; then, an instant after, saw him stretched bleeding and
senseless upon the earth at her feet.
“There is one now. You speak of Harvey Winthrop?”
“Yes!” cried Virginia, almost breathlessly.
“He is living.”
“Living?”
“Yes.”
Virginia sprung to her feet, her face flushed with joy.
“Oh! and I have mourned him as one lost to me forever.”
“By a happy chance I discovered him in the ravine, helpless. Then I
carried him to my cabin and he is there now.”
“Is he wounded dangerously?” Virginia asked, the color forsaking her
cheeks as she thought of the illness of her lover.
“No, only a flesh wound,” Kate answered. “In a few days he will be
well again. He told me that you were his plighted wife, and I
promised him that I would find you if you were living and upon the
earth. But I little expected, though, to find you a captive in the
Shawnee village.”
“Can you save me from the terrible danger that surrounds me?”
Virginia asked, anxiously.
“At least I can try. Heaven alone knows whether the attempt will be
successful or not,” replied Kate, earnestly.
“Oh, my heart sinks within me when I think of the many miles that
intervene between me and my kindred. I fear I shall never see Point
Pleasant again. How can we make our way through the trackless
wilderness, the home of the wild beast and the red savage?” Virginia
asked, in sorrow.
“Do not fear; to me the wilderness is like an open book. Not a path
between here and the Ohio that I do not know as well in the
darkness as in the light. Trust to me, and if human aid is of avail you
shall be saved.”
Then, with a gesture of caution, Kate left the lodge.
CHAPTER XXX.
FATHER AND DAUGHTER.

As Kate left the lodge and turned to the right toward the river, she
found herself suddenly confronted by her father, David Kendrick.
There was a peculiar grin upon the face of the renegade as he
looked upon his daughter.
“Been in to see the little gal, hey?” he asked.
“Yes,” Kate replied.
“Been making a neighborly call, hey? Does the critter know you?”
Kate felt that deception would be useless, so she answered
truthfully.
“Yes.”
“Where did you ever meet her?”
“At Point Pleasant.”
“How does she feel?”
“Badly, of course.”
“Well, that’s nat’ral,” said the renegade, with another grin.
“I should think so.”
“I s’pose you told her that it would be all right—that the chances
were that she would be taken back to the station ’fore long, hey?”
“Yes, I did tell her so,” Kate said, puzzled at the odd manner of her
father.
“Now, see how good I am at guessing. I ought to set up to onc’t for
a Great Medicine Man,” and the renegade laughed, discordantly.
Kate cast a searching glance into her father’s face, but she found
nothing there to aid her in guessing the meaning of his strange
conduct.
“Have you any thing else to say to me?” and Kate made a movement
as if to pass the renegade and proceed on her course.
“Hold on, gal!” cried Kendrick, hastily. “I’ve got a heap to say to you.
Jist foller me off a piece, whar we’ll be out of ear-shot of any skulker,
and then I’ll talk to you like a Dutch uncle,” and again the renegade
laughed discordantly.
With a mind ill at ease Kate followed her father. His manner boded
danger. Yet she could not imagine in what shape that danger would
come.
The renegade led the way toward the wood.
On the border of the thicket he paused.
Close to where he stood was a fallen tree—a huge sycamore.
“Sit down, gal!” and he indicated with his hand the tree-trunk, as he
spoke.
Kate obeyed the command.
“Now, jist wait quiet a moment, till I scout round and see if thar is
anybody in the timber nigh us.”
Then into the thicket he went.
Five minutes’ search convinced the renegade that there was no one
near. Then he returned to the spot where he had left Kate and took
a seat on the tree-trunk by her side.
“Thar, gal, we kin talk here without any danger of any pryin’ sucker
a-hearin’ our talk.”
“Have you any thing particular to say that you are so afraid of being
overheard?” asked Kate.
“Well, yes,” replied Kendrick, after a pause. “I would rather a heap
sight that only two pair of ears should hear what we’re going to say.”
“Well, what is it?”
Kate spoke calmly, yet she had a presentiment that a storm was
about to burst over her head.
“Gal, you don’t play keerds of course, but I guess you understand
what I mean when I tell you to play with your keerds on the table
and not under it,” said the renegade, significantly.
“No,” said Kate, calmly, “I do not understand what you mean.”
“Oh, you don’t,” and the tone of the renegade was clearly one of
unbelief. “Shall I speak plainer then?”
“Yes, if you wish me to understand,” Kate said, quietly.
Kendrick looked at his daughter in wonder. Her calmness staggered
him.
“Well, you are a cool hand. If I wasn’t certain of my game now, I
should think that, like a green dog, I was barking up the wrong tree.
But the trail is too clear for me to be throw’d off.”
“What do you mean?” Neither Kate’s voice or face showed the least
sign of alarm or excitement.
“I must spit it right out, hey?”
“Yes.”
“If so be, so good. Well, gal, I’ve got a powerful long pair of ears. I
were a-passing back of the wigwam where the little gal is, a few
minutes ago, and I heerd something that made me want to hear
more.”
“Indeed?” Kate’s face was as impassible as the face of a statue, and
her voice as cold as ice.
“So I listened and heerd a good deal.”
“What did you hear?”
“’Bout all you said to the little gal,” replied Kendrick, with a grin. “I
heerd you tell her ’bout the young feller that you saved in the ravine.
I s’pose he’s the one I saw in your cabin t’other day, hey?”
“Yes,” Kate replied.
“Well, I thought so when you spoke of him. And then it struck me
what a funny idea it was for you to be ’tending and fussing over
another gal’s feller.”
“It is strange, isn’t it?” said Kate, with a peculiar look. Her father did
not notice the odd look.
“Well, I thought it was; but then, you were always a cranky piece,
full of odd notions.”
“Then you know that I have promised to rescue the girl from her
present dangerous situation?”
“Yes, of course I do,” replied Kendrick; “don’t I tell you that I heard
the whole thing as you talked it over?”
“Do you know why I wish to save the girl from Girty?”
“No, unless you’ve got the milk of human kindness so strong in your
breast that it urges you to save the gal, ’cos she’s in a tight place,”
said the renegade, thoughtfully.
“No, it is not that.”
“What then?”
“I love the same man that she does.”
“Jerusalem!” cried Kendrick, in wonder.
“It is the truth.”
“You mean this young feller, Harvey Winthrop?”
“Yes.”
“Does he care any thing about you?”
“How can he when he is in love with this girl?”
“Yes, that’s true.”
“That is the reason that I wish to take her from here.”
The renegade looked at Kate in wonder.
“I don’t understand,” he said, in utter amazement. “You say that you
love the feller, and yet you are going to give your rival to him.”
“Oh, how dull you are!” cried Kate, impatiently.
“Well I may be,” said Kendrick, doggedly. “Anyway, I can’t make
head nor tail out of your words. If you love the young feller and
want him, I should think that giving him the girl that he likes better
than he does you, was jist the way not to get him.”
“What will be the fate of the girl if she stays here in the Indian
village?”
“Well, I suppose Girty will make a sort of left-handed wife out of her.
I believe that’s his idea.”
“But is there not a chance that she may escape or be rescued by her
friends?” demanded Kate.
“Of course there’s the chance. It ain’t likely, but still it might happen
so.”
“And if she should escape I could never hope to win the love of
Harvey Winthrop.”
“Well, I s’pose that’s Gospel truth.”
“You may be sure that it is the truth!” exclaimed Kate, earnestly.
“But if she never returns to the settlement of course he will never
see her again. Then he will forget her. I have a double claim to his
gratitude if not to his love. Twice have I saved his life.”
“But gratitude ain’t love.”
“No, father; but the space that separates the two sentiments is but a
slight one. Once this girl is out of the way he will learn to love me; I
am sure of it.”
“But you say you are going to give the girl back to him?”
“When you go upon the war-path do you openly tell the foe that you
are coming and bid him prepare to meet you?”
“Well, no; not generally, gal,” replied the renegade, who began to
have a dim perception of his daughter’s plan.
“Neither do I. Cunning is my weapon. The girl thinks me her friend.
Willingly she will consent to be guided by me. By stealth we will
leave the Indian village. Once within the fastness of the thicket,
what will prevent me from removing my rival forever from my path?”
Kendrick gazed at his daughter in admiration.
“You’re a cute gal, by hookey; but what will Girty say when he
discovers that the gal is gone?”
“What can he say, or what do I care what he says?” demanded Kate,
spiritedly. “You do not owe Simon Girty many favors, father.”
“I don’t owe him any,” replied the renegade. “It’s nothing to me if
the gal does get away from him. I sha’n’t worry over it.”
“I will manage it so carefully that not one in this village—be his skin
white or red—will be able to trace us,” said Kate, proudly.
“I’ll back you ag’in’ the whole Shawnee nation for woodcraft,” said
Kendrick, with evident pride.
“I do not think that you would have cause to regret your
confidence.”
“Then your plan is to make the gal think that you are taking her
back to the station; then, when you get her into the thicket, you’ll
settle her for this world?”
“Yes,” said Kate, coldly; not a tone of her voice trembled as she
spoke.
“Won’t Girty swear when he finds that his little gal has absquatulated
and nary sign of her left!” and Kendrick chuckled over the idea.
“I care nothing for his anger; besides, he will not be apt to suspect
that I had a hand in her escape.”
The two then returned to the village.
Girty had little idea that his prey was in danger of slipping from his
grasp.
CHAPTER XXXI.
THE VENGEANCE OF THE RENEGADE.

All was bustle in the Indian village, for word had gone forth to make
ready for the war-path! Gayly the braves donned the war-paint, and
sharpened the scalping-knives and glistening tomahawks.
Girty had been summoned to the lodge of Ke-ne-ha-ha.
The great chief of the Shawnee nation, smarting over his failure to
destroy the dreaded Wolf Demon, panted eagerly for the opportunity
to lead his warriors against the pale-faces.
Girty recounted to the chief all that he had learned regarding the
strength of the settlers—knowledge that he had gained in his recent
scout to the other side of the Ohio.
The chief listened with a gloomy brow. His plan to surprise the
whites had failed.
“Since we can not creep upon them like the fox, our attack shall be
like the swoop of the eagle,” Ke-ne-ha-ha said, at length.
“The chief will attack Point Pleasant first?” Girty asked.
“Yes; we will cross the Ohio above the pale-face lodges; then my
warriors shall form a circle around the long-knives, reaching from
river to river. The circle shall be a line of fire, breathing death to the
pale-face that dares to attempt to cross it.”
“And the expedition will move to-night?”
“Yes; I have dispatched my fleetest runners to my brothers, the
Wyandots and the Mingoes, telling them that the war-hatchet is dug
up, and that, like the storm cloud, the red-men are about to burst in
arrows of fire upon the pale-faces, and drive them from the land
that the Great Spirit gave to the Indian.”
“I will prepare at once for the expedition,” Girty said, in savage glee,
his soul gloating over the prospect of slaughter. Then he withdrew
from the wigwam.
As Girty proceeded in the direction of his own lodge he met
Kendrick.
“Blood ahead, hey?” Kendrick said, as they met.
“Yes; to-night we take up the line of march.”
“And where are you going now?”
“To see my captive.”
“What are you going to do with the gal?”
“Make her my prey,” Girty said, and a look of savage triumph came
over his dark face as he spoke.
“That’s your vengeance, hey?”
“Yes. What wrong can rankle more keenly in the breast of General
Treveling than the knowledge that his cherished daughter is my
slave, the creature of my will?” said Girty, fiercely.
“You’re a good hater,” Kendrick said, with a grin.
“Yes, or my hate would not have lasted all these years. Why, man, I
hate this Treveling as bitterly now as I did years ago when the
lashes cut into my back. I swore once that I would have his life, but
that is poor and paltry vengeance compared to that I have heaped
upon his head. First I stole his eldest daughter—then a mere child—
and left her to perish in the forest, and now I have taken his other
daughter from him. The second blow is worse than the first, for
death is far better than the fate that is in store for Virginia.”
“I s’pose you’ll let him know in some way of what you’ve done?”
Kendrick said.
“He already knows that the death of his eldest daughter lies at my
door; knows, too, that I have carried off this one, but he does not
yet know the fate that I have marked out for her,” Girty replied.
For a moment Kendrick was silent; then he suddenly broke into a
loud laugh.
“Why do you laugh?” asked Girty, in astonishment.
“You’ve fixed this matter out all straight, hain’t you?”
“Yes, I think so.”
“S’pose a bullet from one of the settlers’ long rifles should interfere
with this hyer cunning plan, hey?”
“The bullet is not yet run that is to kill me,” rejoined Girty, sternly.
“Not afeard, hey?”
“Not a whit.”
“Got a ’big medicine?’ as the Injuns say.”
“I do not fear death; that is my ’medicine,’” Girty replied, carelessly.
“Well, I wish I was as sure of not going under as you are,” Kendrick
observed, with a grin.
“By the way, where is your daughter?” Girty asked.
“Inside the wigwam with the little gal,” Kendrick answered.
“I think I’ll visit the girl and let her know the fate that is in store for
her.”
“You’ll find my gal inside,” Kendrick said.
“I’ll be out in a few minutes; wait for me.”
Then Girty entered the wigwam that held Virginia a prisoner.
As Kendrick had said, Kate was there in attendance on the captive.
“Leave us for a little while, girl; I want to speak to the lady alone,”
Girty said.
Without a word, Kate left the wigwam.
Captor and captive were face to face.
The loathing that swelled in the heart of the girl was plainly visible in
her face as she looked upon the man who had betrayed her into the
hands of the savages.
“Do you know who I am, girl?” Girty asked.
“You are Girty, the renegade,” Virginia answered, calmly, though
every vein was throbbing with indignation.
“You are right. I am Girty, and the settlers call me the renegade.”
“Yet I can hardly believe that you are that dreadful man.”
“Why not?”
“Because you have the face of a human, and his should be the face
of a wolf.”
Girty scowled, ominously, at the words.
“Keep your tongue within bounds, or it may be the worse for you.
Do you know where you are?”
“Yes, a prisoner in your hands,” Virginia answered, with a look of
settled despair.
“Do you know what your fate is going to be?”
“Death by some dreadful torture, I suppose.”
“No, your guess is wrong; you are not fated to die yet. Were you the
captive of the Shawnees it is probable that you would die at the
torture-stake; but you are my prisoner; no red brave holds your fate
in his hands.”
“If report speaks true, I am the prisoner, then, of a man whose
nature is more cruel than that of the Indian,” said Virginia, with
spirit.
“I am merciless to those that brave my anger,” retorted Girty, with a
lowering frown.
“And how have I ever wronged you?” asked Virginia, in wonder.
“You have never wronged me.”
“Why then have you torn me from home and friends?”
“You are the daughter of General Treveling?”
“Yes.”
“I hate your father. Through you I strike at him. You are dearer to
him than even life itself. A blow dealt at you also wounds him. That
is the reason why I have lured you from the settlement.” Fierce was
the tone in which Girty uttered the words, and a demon look of
triumph gleamed in his dark eyes.
Virginia listened in wonder. She had often heard her father speak of
the renegade, but always as a stranger.
“How has my father ever injured you?” she asked.
“How?” demanded Girty, in rising wrath. “The cut of his lash has
scarred my back. It happened long years ago, but the memory is as
fresh in my brain as though it were but yesterday. I swore a bitter
oath of vengeance. Years have come and gone, but at last I strike,
and the blow must reach him through you.”
“This is a manly vengeance!” exclaimed Virginia, while her lip curled
in scorn. “If my father has wronged you, why not seek him? Why
select a helpless woman as your victim? Is it because you are too
cowardly to face my father?”
“Taunt on; you will repent these words in scalding tears ere long,”
said Girty, calmly.
“They speak truth in the settlement when they say that you are like
the wolf, both cruel and cowardly.”
“And before another week is gone, they will say, too, that like the
wolf, I love blood, for I will have rivers of it!” cried Girty, savagely.
Virginia’s heart sunk within her as she looked upon the angry face of
the renegade.
“And now your fate; can you guess what it is to be?” he asked.
“No,” Virginia answered.
“You’re to be mine—my slave. This is the vengeance that will scar
your father’s heart and make him curse the hour when he dared to
wrong me!” Triumph swelled in the voice of the renegade as he
spoke.
Virginia—hapless maid—felt that she was lost indeed.
“Oh! why can I not die at once?” she murmured, in despair.
The renegade gazed upon his victim with a smile of triumph.
“First my vengeance, and then death can come to your aid as soon
as fate pleases. It will be rare joy for me to tell your father of the
shame that has come upon you. It is almost worth waiting for all
these years.”
“You are a wolf, indeed,” Virginia murmured, slowly.
“And who has made me so?” demanded the renegade, fiercely. “Your
father! His act drove me from the white cabins to the wigwams of
the savage; made me an outcast from my race; a white Indian. May
the lightning of the Eternal strike me dead if I ever forget or forgive
the injury that he has done me. Even now—after all these years—
the memory of my wrong is as fresh in my brain as though it
happened but yesterday.”
In a torrent of passion came the words from the lips of the angry
man.
Virginia shuddered at his manner.
“You have no pity?” she cried.
“Pity? No!” he said, with fierce accent. “Can pity dwell in the heart of
the wolf? Your father has made me what I now am. Let him blame
himself if the wolf he has created rends his child.”
“I am entirely lost,” Virginia murmured, faintly.
“And now I go to take the war-path against the settlement—to
crimson with blood the waters of the Ohio. I will give to the flames
the cabins of the whites; the smoke of the burning dwellings shall
mark my course and attest my vengeance. When I return, then—
Well, my revenge will be made complete. Let no vain thought of
escape cross your mind, for I shall leave you doubly guarded. There
is no power on this earth that can save you from me. Prepare, then,
to meet your fate with resignation. For the present, farewell.”
Then the miscreant left the lodge.
CHAPTER XXXII.
A STRANGE STORY.

In a tangled mass of bushes, near to the hollow oak that the three
scouts had selected as a meeting-place, Boone and Kenton lay
concealed.
They were waiting for the return of Lark.
“Strange, what can keep him?” muttered Boone, impatiently.
“Haven’t you seen him at all?” Kenton asked.
“No, not since we parted.”
“It must be past twelve.”
“Perhaps he’s been captivated by the red heathens,” Boone
suggested.
“That is possible,” Kenton replied.
“Shall we wait any longer?”
“Just as you say.”
“Hello! what’s that?” cried Boone, suddenly.
The scout’s attention had been attracted by a slight noise in the
wood beyond the little glade.
Eagerly the two listened.
Then, through the wood, with stealthy steps, came a dark form.
It passed close to where the two whites lay in ambush.
Cold drops of sweat stood, bead-like, upon the foreheads of the two
scouts as they looked upon the dark form.
It was the Wolf Demon that was stealing so stealthily through the
wood.
“Jerusalem! did you see it?” muttered Boone, with a shiver, after the
terrible form had disappeared in the shadows of the wood.
“Yes,” replied Kenton, in a solemn tone.
“What do you think it is?”
“It’s a spook, and no mistake,” Kenton said, with a shake of the
head.
“Well, it does look like it, don’t it?” Boone rejoined, sagely.
“Yes. Why, they wouldn’t believe this if we were to tell it in the
station.”
“That’s truth; but seein’ is believin’, you know.”
“I think we may as well be going,” said Kenton, with a nervous
shiver, and a stealthy look around, as though he expected to see a
demon form in every bush.
“And not wait for Lark?”
“What’s the use? It will be morning soon. Ten to one he has missed
us and taken the back track to the station.”
“Yes, that is likely. Let’s be going, then,” coincided Boone.
The two, carefully emerging from their covert in the bushes, crossed
the little glade and passed in front of the hollow oak.
As they passed the tree, Kenton, who was a little in the advance,
halted suddenly and placed his hand in alarm upon the arm of
Boone.
“What’s the matter?” asked Boone, quickly, in a cautious whisper.
“Look there,” Kenton said, in the same low, guarded tone, and, as he
spoke, he pointed to the ground before him.
Boone, with straining eyes, looked in the direction indicated by the
outstretched hand of his companion.

You might also like