C语言小程序错误,创建一维数组30位,取最大值,但运行不了。

317关注1659浏览

#include<stdio.h>#include<stdlib.h>#include<time.h>int getmax(int a[]);int main(){ int i,a[30]; srand(time(NULL)); for(i=0; i<50; i++) a[i]=rand()%101; printf("%d",getmax(a[]));}getmax(int a[]){ int b,j; for(j=0;j<30;j+

共1条回答
  • Bella
    7年前

    #include<stdio.h>
    #include<stdlib.h>
    #include<time.h>
    int getmax(int a[]);
    int main() 
    {
    int i,a[30];
    srand(time(NULL));
    for (i=0; i<

    0 15

发送