Question: My code will not work please help. #include stdio.h #include math.h float rieman ( float lower, float upper, float intervals ) { int

My code will not work please help.
#include "stdio.h"
#include "math.h"
float rieman(float lower, float upper, float intervals){
int width =(upper - lower)/ intervals;
float result;
for (float i = lower; i < upper; i += width){
result = result + exp(pow(i,2));
}
return result;
}
int main(){
float upper;
float lower;
float intervals;
scanf("%f", &lower);
scanf("%f", &upper);
scanf("%f", &intervals);
printf("%f", rieman(lower, upper, intervals));
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!