Hey I'm having a really hard time with an assignment that's due Tuesday at midnight. If anyone out there is willing to help me I would greatly appreciated it!

Please help!!!!

Instructions: http://itech.fgcu.edu/faculty/zalews...sign3-2011.pdf

And the code I was able to produce before I got completely lost

Main file named assign3

Code:#include <iostream> #include <cmath> #include <fstream> #include <cstdlib> #include "funcs3.cpp" using namespace std; // A calculator that solves multiple quadratic equations. void readCoeffs(double& coeffs); struct calcRoots(double coeffs[], double roots[]); void displayvalues(double coeffs[], double roots[]); void toFile(double coeffs[]. double roots[], ofstream outp); main(int Nc, char* Nv[]) { ofstream outp; // declaring an output file stream ifstream inp; // input file stream double coeffs[3], roots[2]; if (Nc !=2) { for (int count = 0; count < Nc; count++) { void readCoeffs(double coeffs[]); struct calcRoots(double coeffs[], double roots[]); void displayValues(double coeffs[], double roots[]); void toFile(double coeffs[], double roots[], ofstream outp); } } }

File containing my functions:

Code:// Functions for a quadratic equation calculator #include <iostream> #include <cmath> #include <cstdlib> using namespace std; void readCoeffs(double coeffs[]) { cout << "Enter coefficient a: " << endl; cin >> coeffs[0]; cout << "Enter coefficient b: " << endl; cin >> coeffs[1]; cout << "Enter coefficient c: " << endl; cin >> coeffs[2]; cout << endl; } struct calcRoots(double coeffs[], double roots[]) { double root1 = ((-coeffs[1]+sqrt((coeffs[1]*coeffs[1])-(4*coeffs[0]*coeffs[2])))/(2*coeffs[0])); double root2 = ((-coeffs[1]-sqrt((coeffs[1]*coeffs[1])-(4*coeffs[0]*coeffs[2])))/(2*coeffs[0])); roots[0] = root1; roots[1] = root2; double dscr(); }; double dscr(double coeffs[]) { double dscrResult = ((coeffs[1]*coeffs[1])-(4*coeffs[0]*coeffs[2])); return dscrResult; } void displayValues(double coeffs[], double roots[]) { if (sqrt((coeffs[1]*coeffs[1])-(4*coeffs[0]*coeffs[2])) >= 0) { cout << "The solutions of a quadratic equation with coefficients: " << endl; cout << "a = " << coeffs[0] << " b = " << coeffs[1] << " c = " << coeffs[2] << endl; cout << "are as follows " << endl; cout << "Root 1: " << roots[0] << endl; cout << "Root 2: " << roots[1] << endl; cout << endl; } else { cout << "The solution of a quadratic equation with coefficients: " << endl; cout << "a = " << coeffs[0] << " b = " << coeffs[1] << " c = " << coeffs[2] << endl; cout << "does not exist in the real domain. " << endl; } } void toFile(double a, double b, double c, double root1, double root2, ofstream outp) { outp.open("results.dat", ios::app); outp << "a = " << a << " b = " << b << " c = " << c << endl; outp << "Root1 = " << root1 << " Root2 = " << root2 << endl; outp << endl; outp.close();