用vc6.0总是报错。
#include<iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
int total, //sum of grades
gradecounter, //number of grades entered
grade, //one grade
average; //average of grades
//initialization phase
total=0; //clear total
gradecounter=1 //prepare to loop
//propessing phase
while(gradecounter<=10); //loop 10times
cout<<”enter grade:”; //prompt for input
cin>>grade; //input grade
gradecounter=gradecounter+1; //increment counter
//termination
average=total/10; //integer division
cout<<”class average is”<<average<<endl;
return 0;
}
>> 本文固定链接: http://www.vcgood.com/archives/3167
//initialization phase
total=0; //clear total
gradecounter=1 //prepare to loop
第3行掉了个分号