#include #include void pqFormel(double &x1, double &x2, double p, double q) { x1=-p/2 +sqrt((p/2)*(p/2)-q); x2=-p/2 -sqrt((p/2)*(p/2)-q); } int main(int argc, char* argv[]) { double x1,x2,p=0.5,q=0.7; //... pqFormel(x1,x2,p,q); //.. }