#include <iostream>
#include <fstream>
#include <string>
#include <cstdint>
#include <cstdlib>
#include <stdexcept>
#include <exception>
using std::cin;
using std::cout;
using std::endl;
class FileNameTooLong :
public std::exception
{
public:
virtual const char* what() const throw()
{
return "Sorry; filename must be 80 chars or less.\n";
}
};
class CouldNotOpenFile :
public std::exception
{
public:
virtual const char* what() const throw()
{
return "Sorry, couldn't open file.\n";
}
};
class BadEntry :
public std::exception
{
public:
virtual const char* what() const throw()
{
return "Sorry, that's a bad entry.\n";
}
};
void read( const std::string FILENAME )
{
std::ifstream inFile;
uint8_t filename_size;
filename_size = FILENAME.length();
++filename_size;
void* filename_c_str_ptr;
char* filename_c_str;
filename_c_str_ptr = malloc( filename_size );
filename_c_str = (char*) filename_c_str_ptr;
filename_c_str_ptr = nullptr;
size_t i;
i = 0;
char* filename_c_str_iter;
filename_c_str_iter = filename_c_str;
char c;
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
FileNameTooLong err;
throw( err );
}
inFile.open( filename_c_str, std::ifstream::in );
bool is_open;
is_open = inFile.is_open();
bool isnt_open;
isnt_open = ! is_open;
if( isnt_open )
{
CouldNotOpenFile err;
throw( err );
}
char d;
bool eof;
bool not_eof;
while( not_eof )
{
d = inFile.get();
eof = inFile.eof();
not_eof = ! eof;
if( not_eof )
{
if( d == '0' )
{
cout << '0';
}
if( d == '1' )
{
cout << '1';
}
if( d == '2' )
{
cout << '2';
}
if( d == '3' )
{
cout << '3';
}
if( d == '4' )
{
cout << '4';
}
if( d == '5' )
{
cout << '5';
}
if( d == '6' )
{
cout << '6';
}
if( d == '7' )
{
cout << '7';
}
if( d == '8' )
{
cout << '8';
}
if( d == '9' )
{
cout << '9';
}
if( d == '.' )
{
cout << '.';
}
if( d == '-' )
{
cout << '-';
}
if( d == ' ' )
{
cout << endl;
}
}
}
cout << endl;
inFile.close();
delete filename_c_str;
filename_c_str_iter = nullptr;
}
void write( const std::string FILENAME )
{
std::ofstream outFile;
uint8_t filename_size;
filename_size = FILENAME.length();
++filename_size;
void* filename_c_str_ptr;
char* filename_c_str;
filename_c_str_ptr = malloc( filename_size );
filename_c_str = (char*) filename_c_str_ptr;
filename_c_str_ptr = nullptr;
size_t i;
i = 0;
char* filename_c_str_iter;
filename_c_str_iter = filename_c_str;
char c;
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
try
{
c = FILENAME.at( i );
}
catch( std::out_of_range& e )
{
c = 0;
}
*filename_c_str_iter = c;
++i;
++filename_c_str_iter;
}
if( i < filename_size )
{
FileNameTooLong err;
throw( err );
}
outFile.open( filename_c_str, std::ofstream::out );
bool is_open;
is_open = outFile.is_open();
bool isnt_open;
isnt_open = ! is_open;
if( isnt_open )
{
CouldNotOpenFile err;
throw( err );
}
uint8_t number_of_entries;
cout << "How many entries will you have?";
cout << endl;
cout << ">> ";
cin >> number_of_entries;
number_of_entries -= '0';
float entry;
uint16_t j;
uint8_t ones_digit;
bool cin_is_good;
bool cin_isnt_good;
j = 0;
std::string ordinal;
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
if( j < number_of_entries )
{
++j;
ones_digit = j % 10;
cout << "Please input the ";
cout << j;
switch( ones_digit )
{
case 1:
ordinal = "st";
break;
case 2:
ordinal = "nd";
break;
case 3:
ordinal = "rd";
break;
case 4:
ordinal = "th";
break;
case 5:
ordinal = "th";
break;
case 6:
ordinal = "th";
break;
case 7:
ordinal = "th";
break;
case 8:
ordinal = "th";
break;
case 9:
ordinal = "th";
break;
case 0:
ordinal = "th";
break;
}
cout << ordinal;
cout << " number.";
cout << endl;
cout << ">> ";
cin >> entry;
cin_is_good = cin.good();
cin_isnt_good = ! cin_is_good;
if( cin_isnt_good )
{
BadEntry err;
throw( err );
}
outFile << entry;
outFile << ' ';
}
outFile.close();
delete filename_c_str;
filename_c_str_iter = nullptr;
}
int main()
{
std::string filename;
cout << "Please enter the filename.";
cout << endl;
cout << ">> ";
cin >> filename;
std::string mode;
cout << "Please select either \"read\" or \"write\" mode.";
cout << endl;
cout << ">> ";
cin >> mode;
if( mode == "read" )
{
try
{
read( filename );
}
catch( FileNameTooLong& err )
{
cout << err.what();
}
catch( CouldNotOpenFile& err )
{
cout << err.what();
}
}
else if( mode == "write" )
{
try
{
write( filename );
}
catch( FileNameTooLong& err )
{
cout << err.what();
}
catch( CouldNotOpenFile& err )
{
cout << err.what();
}
catch( BadEntry& err )
{
cout << err.what();
}
}
else
{
cout << "Bad mode, sorry!";
cout << endl;
}
}