# 初级问题---求各位江湖好汉帮个忙。绝对散分！！

pro_wang 2002-10-07 03:23:27

//Declaration syntax error
//Call to undefined function
//Lvalue required
//’gradesize'is assigned a value that is never used.

#include <iostream.h>

int array[6][4]={ {80,56,78,94},
{89,87,69,98},
{78,87,79,90},
{67,78,97,79},
{65,75,86,93},
{85,84,78,67}
}

int getLevel(int ,int );

void main()
{
int typeA=0,typeB=0;
int student=6;

for(int i=0;i<student;i++)
typeA++;
else
typeB++;

cout<<"number of type A is "<<typeA<<endl;
cout<<"number of type B is "<<typeB<<endl;
}

{
int sum=0;
for(int i=0;i<size;i++)

sum/=size;
if(sum>=80)
return 1;
else
return 0;
}
...全文
29 点赞 收藏 6

6 条回复

birdzxy 2002-10-08

starmaggie 2002-10-08
wangran的结果是正确的。哥们，太粗心了吧！

zhpsam109 2002-10-08

hurrah_yule 2002-10-07

_炳叔_ 2002-10-07

wangran 2002-10-07
#include <iostream.h>

int array[6][4]={ {80,56,78,94},
{89,87,69,98},
{78,87,79,90},
{67,78,97,79},
{65,75,86,93},
{85,84,78,67}
}; //这里少了一个分号！

int getLevel(int[] ,int );//这里第一个参数应该是个数组！

void main()
{
int typeA=0,typeB=0;
int student=6;

for(int i=0;i<student;i++)
typeA++;
else
typeB++;

cout<<"number of type A is "<<typeA<<endl;
cout<<"number of type B is "<<typeB<<endl;
}

{
int sum=0;
for(int i=0;i<size;i++)

sum/=size;
if(sum>=80)
return 1;
else
return 0;
}

C语言

6.4w+

C语言相关问题讨论

2002-10-07 03:23