9_1.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:1k
源码类别:

C#编程

开发平台:

Visual C++

  1. //9_1
  2. (1)
  3. #include <iostream.h>
  4. const size=10;
  5. void findmax(int* a, int n, int i, int& pk);
  6. void main()
  7. {
  8.   int a[size];
  9.   int n=0;
  10.   cout <<"please input " <<size <<"datas:n";
  11.   for(int i=0; i<size; i++)
  12.     cin >>a[i];
  13.   findmax(a, size, 0, n);
  14.   cout <<"the maximum is " <<a[n] <<endl
  15.        <<"It's index is " <<n <<endl;
  16. }