If statement 为什么调试嵌套if语句程序时会出现运行时错误? #包括 `#包括 使用名称空间std; int main() { int test1、test2、test3; 平均值; testAverage=(test1+test2+test3)/3; cout-tes

If statement 为什么调试嵌套if语句程序时会出现运行时错误? #包括 `#包括 使用名称空间std; int main() { int test1、test2、test3; 平均值; testAverage=(test1+test2+test3)/3; cout-tes,if-statement,compiler-errors,nested,runtime,If Statement,Compiler Errors,Nested,Runtime,为什么调试嵌套if语句程序时会出现运行时错误? #包括 `#包括 使用名称空间std; int main() { int test1、test2、test3; 平均值; testAverage=(test1+test2+test3)/3; cout-test1; cin>>测试2; cin>>试验3; 我不知道你为什么要用“ #include <iostream> `#include <string> using namespace std; int main() { i

为什么调试嵌套if语句程序时会出现运行时错误?
#包括
`#包括
使用名称空间std;
int main()
{
int test1、test2、test3;
平均值;
testAverage=(test1+test2+test3)/3;
cout-test1;
cin>>测试2;
cin>>试验3;

我不知道你为什么要用“
#include <iostream>
`#include <string>
using namespace std;
int main()
{
int test1, test2, test3;
int testAverage;
testAverage = (test1 + test2 + test3)/3;
cout << "Please enter your three test scores" << endl;
cin >> test1;
cin >> test2;
cin >> test3;
cout << "Your total test average is " << testAverage << endl;//my total     average displays an insanly high number here as well im unsure why
if (testAverage >= 90)

    cout << "Your Grade Is an A average" << endl;

else
{
    if (testAverage < 90)
    {
        cout << "Your test average is B" << endl;
    }
    else if (testAverage < 80)
    {
        cout << "Your test average is C" << endl;
    }
    else
    {
        if (testAverage < 70)
        {
            cout << "Your test average is D" << endl;
        }
    }
}
        return 0;
    }