C++程序设计变量与常量

录入如下程序,将其改对。
using namespace std;#include int main(){
int student,age; int if=1;
float score=90; stadent=2; Age=20.7;
cout<

Age前面的分号改成逗号
stadent改为student
你写了age和Age两个年龄变量,Age=20.7,难道年龄有小数?

#include <iostream>
using namespace std;

int main()
{

    int student, age; 
    int IF = 1;//if是选择语句,不能表示变量
    float score = 90.0;
    float stadent = 2.0;
    float Age = 20.7;
    cout << IF << "  " << stadent << endl;//student是变量,并且没有初始化,无法输出
    cout << Age<< " " << score << endl;;//想要换行的话,c++中用endl
    
    return 0;
}