/* Root of ax + b = 0 */ #include #include #include using namespace std; int main(int argc, char *argv[]) {char ans; double a, b, root; cout<<"Do you want to solve an equation (y/n): "; cin>>ans; while (ans=='y') // zero or more equations { do { cout<<"Input the coefficients a, b of the equation."<> a >> b; } while (a==0); cout<< "Coefficients are "<>ans; } system("PAUSE"); return 0; }