Commit 208a749f by makuks

Upload New File

parent 5396a095
Showing with 48 additions and 0 deletions
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(){
double A;
double B;
double N;
double H;
double x;
double y;
double nominator;
double denominator;
printf("Please enter the starting value: ");
scanf("%lf", &A);
printf("Please enter the enter the stopping value: ");
scanf("%lf", &B);
printf("Please enter the number of steps: ");
scanf("%lf", &N);
H = (B - A) / N;
for(x = A; x <= B; x += H){
printf("x value: %lf ", x);
nominator = (2 * x) + 1;
denominator = (pow ( 2 * pow( x, 2) + 3 * x +4, 3));
if( denominator < 0){
printf("Function value is a complex number");
}else{
if(denominator == 0){
printf("Function value is not available");
}else{
denominator = sqrt( denominator) - 7;
y = nominator / denominator;
printf("y value: %lf", y);
printf("\n");
}
}
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment