When I run my code on dev,it remind me this error,however i can't find any bug ,so hope someone can tell me what wrong with the code thanks!
Here is my code:
#include<iostream>
using namespace std;
int main(){
int a[12][12];
char c;
cin>>c;
for (int i = 0; i < 11; ++i)
for (int j = 0; j < 12; ++j)
cin >> a[i][j];
double sum=0;
if (c=='S'){
for (int i = 1; i < =10; ++i)
for (int j = 12-i; j >=1; --j)
sum=sum+a[i][j];
printf("%.1f",sum);
}
else if(c=='M'){
for (int i = 1; i < =10; ++i)
for (int j = 12-i; j >=1; --j)
sum=sum+a[i][j];
printf("%.1f",sum/66);
}
}
question from:
https://stackoverflow.com/questions/65861576/error-expected-primary-expression-before-token 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…