| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
为什么显示run time error 这不写得好好的。。。怎么优化啊#include<stdio.h>
int main()
{
int r,e,c,n,i,k,a[99][3];
void judge(int x,int y,int z);
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %d %d",&a[i][0],&a[i][1],&a[i][2]);
}
for(k=0;k<n;k++)
{
judge(a[k][0],a[k][1],a[k][2]);
}
getch();
}
void judge(int x,int y,int z)
{
if(x+z<y)
printf("advertise\n");
else if(x+z==y)
printf("does not matter\n");
else
printf("do not advertise\n");
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator