C++。编程题,题目如下。答:switch(type) { case 1: sprintf(str,"%10s %10s %5.2f %5.2f %5.2f %5.2f\n",this->sID.c_str(),this->sName.c_str(),this->score1,this->score2,this->score3,this->avg); cout<<str; break; case 2: sprintf(str,"%10s %5.2f\n",this->sName,this->avg); break; default: cout...