Hello,
I need help with file input/output. I need to include statements in my code that will read a file input/output. Thanks for all responses! Here's my code:
#include <stdio.h>
#include <math.h>
int main(void) {
/* Variable declarations: */
double SR, CR, L, X, H;
/*Function body: */
SR=0.0;
CR=0.0;
L= 0.0;
X= 0.0;
H= 0.0;
printf("Enter increment value: ");
scanf("%lf", &X);
printf("Enter low value: ");
scanf("%lf", &L);
printf("Enter high value:");
scanf("%lf", &H);
printf("Value Square Root Cubic Root \n");
while (L >= H) {
printf("Low is greater than High, please re-enter:");
scanf("%lf", &X);
scanf("%lf", &L);
scanf("%lf", &H);
} /* end while */
while (L <= H) {
X=1.0/3.0;
SR = sqrt(L);
CR = pow(L,X);
printf("%3.1f %7.5f %7.5f \n",L, SR, CR);
L = L + 0.1;
}/* end while */
return 0;
} /* end function main */