Tue Oct 24 2023 14:03:06 GMT+0000 (Coordinated Universal Time)
Saved by @AdomsNavicki
if (a != 0) { // Išvengiame dalybos iš nulio double x = static_cast<double>(-b) / a; cout << "x = " << fixed << setprecision(2) << x << endl; } else { cout << "Tiesinė lygtis neturi vienintelio sprendinio, nes a = 0." << endl; } return 0; }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments