やれることはやりました、助けてください
Posted: 2007年1月23日(火) 19:46
入力ファイルSEISEKI.datを事前に用意し、出力ファイルresilt.datを作成するプログラムqtotal.cを書け!
という問題です。 入力と出力ファイルはコマンドラン引数から文字列として取得し、プログラムでは構造体を使用する。実行方法>bcc -ehensa qtotal4.c >qtotal4 SEISEKI.dat result.dat
result.dat の内容 SEISEKI.datのなかみです↓
Grade Name Eng. Math. Sci. Total Mean Hensa
1 Lawler,E.L. 90 85 78 253 84.33 65 Lawler,E.L. 90 85 78
2 Jong,K.A. 80 80 91 251 83.67 65 Forrest,S. 60 85 100
3 Forrest,S. 60 85 100 245 81.67 63 Richardson,J. 60 70 65
4 Powell,M.J.D. 90 85 40 215 71.67 54 Powell,M.J.D. 90 85 40
4 Martin,F.G. 80 75 60 215 71.67 54 Martin,F.G. 80 75 60
6 Smith,R.E. 50 75 85 210 70.00 53 Reed,J. 50 60 98
7 Reed,J. 50 60 98 208 69.33 52 Holland,J.H. 100 70 33
8 Fletcher,R. 80 65 60 205 68.33 51 Smith,R.E. 50 75 85
9 Holland,J.H. 100 70 33 203 67.67 51 Fletcher,R. 80 65 60
9 Brent,R.P. 30 90 83 203 67.67 51 Brent,R.P. 30 90 83
11 Jones,W.T. 80 65 56 201 67.00 50 Jones,W.T. 80 65 56
12 Richardson,J. 60 70 65 195 65.00 48 Goldberg,D.E. 50 40 35
13 Wilson,S.W. 50 60 73 183 61.00 45 Baker,J.E. 50 40 75
14 Baker,J.E. 50 40 75 165 55.00 40 Wilson,S.W. 50 60 73
15 Ackley,D.H. 50 67 35 152 50.67 36 Jong,K.A. 80 80 91
16 Keller,K.S. 30 40 81 151 50.33 36 Ackley,D.H. 50 67 35
17 Goldberg,D.E. 50 40 35 125 41.67 28 Keller,K.S. 30 40 81
Mean of Total = 198.82 Standard Deviation of Total = 34.25
↑結果がこのようになるそうです。
自分で作ったプログラムではうまくはしらなかったです。
という問題です。 入力と出力ファイルはコマンドラン引数から文字列として取得し、プログラムでは構造体を使用する。実行方法>bcc -ehensa qtotal4.c >qtotal4 SEISEKI.dat result.dat
result.dat の内容 SEISEKI.datのなかみです↓
Grade Name Eng. Math. Sci. Total Mean Hensa
1 Lawler,E.L. 90 85 78 253 84.33 65 Lawler,E.L. 90 85 78
2 Jong,K.A. 80 80 91 251 83.67 65 Forrest,S. 60 85 100
3 Forrest,S. 60 85 100 245 81.67 63 Richardson,J. 60 70 65
4 Powell,M.J.D. 90 85 40 215 71.67 54 Powell,M.J.D. 90 85 40
4 Martin,F.G. 80 75 60 215 71.67 54 Martin,F.G. 80 75 60
6 Smith,R.E. 50 75 85 210 70.00 53 Reed,J. 50 60 98
7 Reed,J. 50 60 98 208 69.33 52 Holland,J.H. 100 70 33
8 Fletcher,R. 80 65 60 205 68.33 51 Smith,R.E. 50 75 85
9 Holland,J.H. 100 70 33 203 67.67 51 Fletcher,R. 80 65 60
9 Brent,R.P. 30 90 83 203 67.67 51 Brent,R.P. 30 90 83
11 Jones,W.T. 80 65 56 201 67.00 50 Jones,W.T. 80 65 56
12 Richardson,J. 60 70 65 195 65.00 48 Goldberg,D.E. 50 40 35
13 Wilson,S.W. 50 60 73 183 61.00 45 Baker,J.E. 50 40 75
14 Baker,J.E. 50 40 75 165 55.00 40 Wilson,S.W. 50 60 73
15 Ackley,D.H. 50 67 35 152 50.67 36 Jong,K.A. 80 80 91
16 Keller,K.S. 30 40 81 151 50.33 36 Ackley,D.H. 50 67 35
17 Goldberg,D.E. 50 40 35 125 41.67 28 Keller,K.S. 30 40 81
Mean of Total = 198.82 Standard Deviation of Total = 34.25
↑結果がこのようになるそうです。
自分で作ったプログラムではうまくはしらなかったです。