练习11
1 1 //------------------------------------- 2 // EX1101.cpp 3 // 解方程 4 //------------------------------------- 5 #include"Root.h" 6 #include<iostream> 7 using namespace std; 8 //------------------------------------- 9 int main(){ 10 for(double a,b,c; cin>>a>>b>>c; ) 11 Root(a,b,c).solve(); 12 }//------------------------------------ View Code 1 //------------------------------------- 2 // Root.h 3 //------------------------------------- 4 #ifndef HEADER_ROOT 5 #define HEADER_ROOT 6 //------------------------------------- 7 class Root{ 8 double aa,bb,cc; 9 public: 10 Root(double a, double b,