int Input_Sq(SqList &L)
{//顺序表的输入
int n;
cin>>n; //图书数目n
for(int i=0;i<n;i++)
{
cin>>L.elem[i].no>>L.elem[i].name>>L.elem[i].price;
L.length++;
}
return OK;
}
int HighestPrice_Sq(SqList L)
{//查找价格最高的图书并输出相应图书的信息
/**************begin************/
int i;
float hp=L.elem[0].price; //辅助变量hp存储最高价格
for(i=0;i<=L.length-1;i++) //第一趟遍历:求出最高价格hp
if(hp<L.elem[i+1].price)
hp=L.elem[i+1].price;
int n=0; //辅助变量n存储最高价格的书的数目
for(i=0;i<=L.length-1;i++) //第二趟遍历:求出最高价格的书的数目n
if(hp==L.elem[i].price)
n++;
cout<<n<<endl;
for(i=0;i<=L.length-1;i++) //输出这n本最高价格的书的信息
if(hp==L.elem[i].price)
cout<<L.elem[i].no<<" "<<L.elem[i].name<<" "<<fixed<<setprecision(2)<<L.elem[i].price<<endl;
return OK;
/**************end************/
}