but im telling u, it fixed my problem, some1 posted a link on THIS topic about that, and then i came to the idea that void main() was the problem, because in that article says that it can affect protabilety
#include<iostream>
#include<cmath>
usingnamespace std;
int main()
{ //ax^2+bx+c=0
double a, b, c, x, d; // d is the discriminant
char ponovo;// this variable is for the looping
do{
cout<<"*******************************"<<endl;
cout<<"* Izracun kvadratne jednadzbe *"<<endl;
cout<<"*******************************\n\n";
cout<<"Ovaj program sluzi za provjeru "<<endl;
cout<<"Ovaj program sluzi za."<<endl;
cout<<"Ona je ovog oblika:\n\n";
cout<<"*** ax^2+bx+c=0 ***\n\n";
cout<<"Slovo (x) predstavlja nepoznanicu."<<endl;
cout<<"Slovo (a) predstavlja broj koji mnozi ."<<endl;
cout<<"Slovo (b) predstavlja broj koji mnozi nepoznanicu."<<endl;
cout<<"Slovo (c) predstavlja slobodni clan.\n\n";
cout<<"NAPOMENA: Program radi ispravno samo za pot."<<endl;
cout<<"Unesite SAMO brojeve, ako unesete s"<<endl;
cout<<"Unesite broj (a):";
cin>>a;
cout<<"Unesite broj (b):";
cin>>b;
cout<<"Unesite broj (c):";
cin>>c;
cout<<endl;
cout<<"Unijeli ste jednadzbu:\n\n";
cout<<"*** ("<<a<<")x^2+("<<b<<")x+("<<c<<")=0 ***\n\n";
d=pow(b,2.0)-4*a*c; //calculation starts here
if(d>0){
cout<<"Diskriminanta jednadzbe je veci od 0"<<endl;
cout<<"To znaci da jednadzba ima 2 rjesenja."<<endl;
x=((-1)*b+sqrt(d))/(2*a);
cout<<"x1="<<x<<endl;
x=0;
x=((-1)*b-sqrt(d))/(2*a);
cout<<"x2="<<x<<endl;}
if(d==0){
cout<<"Diskriminanta jednadzbe je jednak 0"<<endl;
cout<<"To znaci da jednadzba ima 1 rjesenje."<<endl;
x=((-1)*b)/(2*a);
cout<<"x="<<x<<endl;}
if(d<0){
cout<<"Diskriminanta jednadzbe je manji od 0"<<endl;
cout<<"To znaci da jednadzba nema realno rjesenje."<<endl;}
cout<<endl;
cout<<"Ako zelite ponoviti unesite slo"<<endl;
cout<<"Ako nezelite ponoviti, unesite bilo"<<endl;
cout<<"Unesite slovo: ";
ponovo='n'; // makes sure there is no endless loop ifnon-numbere is entered
cin>>ponovo;// user decides to repeat or not
if(ponovo=='d')
cout<<"\n\n";
}while(ponovo=='d'||ponovo=='D');
return 0;
}