1
/*------------------------------------------------
【程序设计】
--------------------------------------------------
题目: 给定n个数据, 求最大值出现的位置
(如果最大值出现多次,求出第一次出
现的位置即可)。
--------------------------------------------------
注意:部分源程序给出如下。请勿改动主函数
main和其它函数中的任何内容,仅在函数
station的花括号中填入所编写的若干语句。
*********Begin**********和********** End **********不可删除
------------------------------------------------*/
#include<stdio.h>
int station(int s[],int n)
{
/*********Begin**********/
/********** End **********/
}
main()
{
int a[100],n,i,t;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
t=station(a,n);
printf("the max_value position is:%d\n",t);
TestFunc();
}
TestFunc()
{
FILE *IN,*OUT;
int n;
int i[10];
int o;
IN=fopen("in.dat","r");
if(IN==NULL)
{
printf("Read File Error");
}
OUT=fopen("out.dat","w");
if(OUT==NULL)
{
printf(