26.09.2015 Views

PROGRAMSKI JEZICI 2

Предавање 1

Предавање 1

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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!