标题:这个程序哪里错了。如何变?
取消只看楼主
我是岳阳人
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2004-8-13
 问题点数:0 回复次数:0 
这个程序哪里错了。如何变?
#include "stdlib.h"

#include "stdio.h"

#define M 50

#define N 10

getdata (int *s)

{ int i;

for(i=0; i<M; i++) s=random(10);

}

stat(int *a,int *c)

{ int i;

for(i=0;i<N; i++) c=0;

for(i=0;i<M; i++) c[a]++;

}

outdata (int *c)

{int i;

for (i=0;i<N; i++) printf("%d : %d\n",i,c);

}

main()

{ int a[M],c[N];

getdata (a);

stat(a,c);

printf("Output the result: \n");

outdata(c);

}

出现了“rror C2065: 'random' : undeclared identifier“



4iBxndxm.jpg (19.34 KB)
2004-08-14 11:45
  • 1
  • 1/1页
  • 1



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-4245-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.328648 second(s), 9 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved