Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #54.9K
The following short program is taken from a book in numerical analysis (by Mircea Andrecut). It's about bisection (very simple): #include<stdio.h> #include<stdlib.h> #include<math.h> double f(double x) { return x*x-3; } double bisection(double f(double), double a, double b) { double epsilon = 1E-7, x; int kmax, k; if (f(a)*f(b) > 0) … |
|
The following short program is obvious wrong (it's taken from the book "How Not To Program In C++" by Steve Oualline, p.15): int main() { // An array for the squares int array[5]; int i; // Index into the array for (i = 1; i <= 5; ++i) { array[i] … |