Hello again,
I cant seem to get the forth root to execute properly. Eg; at int 3 the square should read 1.732050808 and the forth root should read 1.316074013. Now my squares are fine but the forth roots aren't. What is wrong in my program and how can i fix it quickly.
Thanx,
#include<stdio.h>
#include<math.h>
void prn_heading (void);
void prn_and_read_data (void);
int main()
{
prn_heading();
prn_and_read_data();
return 0;
}
void prn_heading(void)
{
printf("%3s%28s%28s%28s",
"Integer", "Square Root", "Fourth Root\n",
"--------------------------------------------------------------\n\n");
return;
}
void prn_and_read_data (void)
{
int x;
double square_root, fourth_root;
for (x = 1; x <= 100; ++x)
printf("%5d:%28.9e %28.9e\n", x = x, sqrt(x), square_root = pow(x, x));
fourth_root = square_root * square_root;
printf("%50.9e", fourth_root);
;
return;
}