Im still geting
trying everything, and still dont get how to fix it.Code:1 -1 0 1.11 -0.9 0 1.25 -0.8 0 1.43 -0.7 0 1.67 -0.6 0 2 -0.5 0 2.5 -0.4 0 3.33 -0.3 0 5 -0.2 0 10 -0.1 0 -1.34e+07 7.45e-08 0 -10 0.1 0 -5 0.2 0 -3.33 0.3 0 -2.5 0.4 0 -2 0.5 0 -1.67 0.6 0 -1.43 0.7 0 -1.25 0.8 0 -1.11 0.9 0
Code:#include <iostream> #include <cstdlib> #include <iomanip> #include <math.h> using namespace std; int main () { float y, c, ap, ag; c = 0; ap = -1; ag = 1; float az = 0.1; if (ag > ap && az > 0.0) { for (float a = ap; a <= ag; a += az) { if ( fabsf(c - a) < 0.0 && fabsf(c - a) > 0.0 ) { cout << "1/0 not posible"; } else { y = 1.0 / (c - a); cout << setprecision(4) << y <<" " << a << " " << c << endl; } } } else cout << "STOP"; system ("pause"); return 0; }




Reply With Quote
