Header File: (In my projects it is listed as "headerSquareCube.h") but it is listed as a project.
//
// fheaderSquareCube.h
//
float funcSquareCube (float, float&);
main function: (In my projects it is listed as "mainSquareCube") and listed as a project.
// mainSquareCube.cpp
//
#include <iostream>
#include <iomanip>
#include "headerSquareCube.h"
using namespace std;
int main()
{
float input;
float input_squared;
float input_cubed;
cout << "Enter A Value : "; cin >> input;
input_squared = funcSquareCube(input, input_cubed);
cout << fixed << setprecision(2);
cout << "Input Squared : " << setw(6) << input_squared << endl;
cout << "Input Cubed : " << setw(6) << input_cubed << endl;
return (0);
}
called function: (In my projects it is listed as "funcSquareCube") and listed as a project.
//
// funcSquareCube.cpp
//
#include <cmath>
using namespace std;
float funcSquareCube(float x, float& cube)
{
float square;
square = pow(x, 2.0);
cube = pow(x, 3.0);
return (square);
}
What am I missing?