templateclassequation{private:Ta,b,c,x1,x2;public:equationTn,Tm,Tkan,bm,ck{};~equation;booldelta;boolresult;boolshow;}templateboolequation::delta{Ttemp=b*b-4ac;returntemp>=0;}templateboolequation::result{ifdelta{Ty=sqrb*b-4ac;x1=-b+y/2;x2=-b-y/2;returntrue;}returnfalse;}templatevoidequation::show{ifresultstd::cout<<"x1="<。
黎登想2020-01-17 21:02:46