rw_calc.h

//Programmer: Eric Barnes

//Date: 3/19/2014

//Class: CS 53

//Filename: rw_calc.h

//Description: Function prototypes and documentation for ralphs caclulator

#ifndef RW_CALC_H

#define RW_CALC_H

#include <iostream>

using namespace std;

const int EXP_TERMS = 10;

const int SINH_TERMS = 5;

const int ROOT_ITRS = 8;

//Description: Greets the user

//pre: none

//post: greeting message is output to screen

void greet();

//Description: outputs menu and collects users choice

//pre: none

//post: menu and prompt are output to the screen

// users selection is returned

int menu();

//Description: outputs an error message telling user to choose x

//pre: none

//post: error message is output to screen

void demand_x();

//Description: collects positive numerical input from user

//Pre: none

//Post: prompt for numerical value is output to screen

// returns positive real number given by user

float get_posnum(const string numname);

//Description: Calculates the nth power

//Pre: n must be positive

//Post: returns the nth power of x

float pow(const float x, const int n);

//Description: Calculates the factorial of x

//Pre: x must be positive

//Post: returns the factorial of x

int fact(const int x);

//Description: Calculates the nth root of x

//Pre: x and n must be positive

//post: returns the nth root of x

float nth_root(const float x, const int n);

//Description: Calcuates e^x

//Pre: x must be positive

//Post: returns e^x

float exponential(const float x);

//Description: Calculates sinh(x)

//Pre: x must be positive

//Post: returns sinh(x)

float sinh(const float x);

//Description: tells user program is complete

//Pre: none

//Post: Goodbye message is output to screen

void goodbye();

#endif