My assignment is to make a table of numbers to use in a math problem.
Ask the user for three numbers:
The first number represents how many values are to be in the table. (1 to 25)
The second number represents the first value in the table. (-1000 to +1000)
The third number represents the increment between successive values in the table. (1 to 20)
The values have to generated and displayed using square,square root, cube, and cube root.
I have worked on this for a while and I would appreciate it if someone could help me get started on this project. Here is what I have so far.
double sqrt( double x);
float sqrt( float x );
long doublesqrt( long double x );
cout << "How many values should the table contain (1-25)? " << endl;
double x, y, z;
for ( int i=0; i<26; i++)
{
x = i;
y = sqrt( i * 25.0 );
z = pow( sqrt( i * 25.0 ), sqrt( 4.0 ) );
cout << "i=" << i << ", \tx=" << x <<
", \ty=" << y << ", \tz=" << z << endl;
}
cout << "What number represents the first value in the table (-1000 - +1000)? " << endl;