C/C++の宿題を片付けます 96代目at TECH
C/C++の宿題を片付けます 96代目 - 暇つぶし2ch441:デフォルトの名無しさん
07/09/27 23:51:00
>>439
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
struct bk{
string n;int v,p;
void r(){cin>>n>>v>>p;}
void w(){cout<<n<<" "<<v<<" "<<p<<endl;}
bool operator<(const bk&b)const{return v<b.v;}
};
int main(){
bk b[10];
for(int i=0;i<10;i++)b[i].r();
sort(b,b+10);
for(int i=0;i<10;i++)b[i].w();
return 0;
}


次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch