Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
函数指针数组
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 145, Accepted users: 113
Problem 10486 : No special judgement
Problem description
  使用函数指针数组将题10485的程序改写成使用菜单驱动界面。程序提供5个选项如下所示(应在屏幕上显示):

Enter a choice :

O   Print the array of grades

1   Find the minimum grade

2   Find the maximum grade

3   Print the average on all tests for each student

4   End program.

Input
  第一行是一个整数T,表示有T组数据。每组数据有M+1行,前M行为M个学生的N门功课的成绩,成绩之间用空格分隔,M+1行为一个整数n,表示选择菜单的次数,后面为n个选项(取值0-4)。

Output
  对于每一组数据,先输出“Case #:”(#为序号,从1起),换行;然后按样例输出样式输出。菜单项为1的时候标题之间空3个空格、数据之间空4个空格,行尾也有空格,与前面一致;菜单项为3的时候,数据之间有4个空格,行尾无空格;其他情况每行最后无空格。

Sample Input
1
78 87 67 82
90 67 88 78
80 75 91 81
5 0 1 2 3 4
Sample Output
Case 1:
Enter a choice:
0  Print the array of grades
1  Find the mininum grade
2  Find the maxinum grade
3  Print the average on all tests for each student
4  End program
No   kc1   kc2   kc3   kc4
1    78    87    67    82
2    90    67    88    78
3    80    75    91    81
Min score:67
Max score:91
Average_score:
1    78.5
2    80.75
3    81.75
Submit   Clarifications   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:18416 today,16241407 total, since 2010-05-07