C/C++の宿題を片付けます 99代目 at TECH
[2ch|▼Menu]
457:デフォルトの名無しさん
07/11/14 00:30:00
>>437 (>>452)
#include <iostream>
#include <iomanip>
int hyouka( int ) ; // 5段階評価する関数
int main(void)
{
const int x = 10 ; // 入力できる人数
int a[x] ; // テストの点数
int b[x] ; // 1〜5の成績
int i ;
for( i=0 ; i<x ; i++){
std::cout << i+1 << "人目の成績 >>> " ;
std::cin >> a[i] ;
b[i] = hyouka( a[i] ) ;
}
std::cout << "番号:点数:評価" << std::endl;
for( i=0 ; i<x ; i++)
std::cout << std::setw(4) << i + 1 << ':'
<< std::setw(4) << a[i] << ':'
<< std::setw(4) << b[i] << std::endl;
return 0 ;
}


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

4817日前に更新/222 KB
担当:undef