Skip to main content
Search
Search This Blog
Ou Visal
Pages
More…
Share
Get link
Facebook
X
Pinterest
Email
Other Apps
July 03, 2022
AREA UNDER CURVE
Name : Ou Visal
ITE-A2
Area Under Curve
DATA _AUC
We use C++ to complier
#include
#include
int main() { char n; std::fstream File("AUC.csv"); double x[351]; double y[351]; double AUC = 0.0; int i = 0; while (i < 351) { File >> x[i] >> n >> y[i]; i++; } int j = 0; while (j < i - 1) { AUC += (y[j] + y[j + 1]) * (x[j + 1] - x[j]) / 2; j++; } std::cout << "Answer : Area under curve = " << AUC << std::endl; std::cin.get(); return 0; }
RESULT
REAULT IN EXCEL
Comments
Popular Posts
October 23, 2022
Midterm Math
June 07, 2022
Exercise 3.1 Chapter 3
Comments
Post a Comment