26.09.2015 Views

PROGRAMSKI JEZICI 2

Предавање 1

Предавање 1

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Sledeći primer prikazuje program za rešavanje kvadratne jednačine, uz<br />

upotrebu kompleksnih<br />

promenljivih:<br />

#include <br />

#include <br />

#include <br />

int main()<br />

{<br />

double a, b, c;<br />

cout > a >> b >> c;<br />

double d = b * b – 4 * a * c;<br />

if(d >= 0) {<br />

double x1 = (-b - sqrt(d)) / (2 * a);<br />

double x2 = (-b + sqrt(d)) / (2 * a);<br />

cout

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!