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 <iostream> #include <fstream> 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
December 04, 2022
Final Math ll
October 23, 2022
Midterm Math
Comments
Post a Comment