小编dst*_*num的帖子

我对else if语句做错了什么

该程序告诉我它需要一个带有else if语句的语句.我真的很新,而且在我上大学之前参加任何CS课程之前,我正在尝试学习c ++代码.提前致谢!

#include <iostream>
#include <string>
using namespace std;
string color;
string Blue;
string Green;
string Brown;

int age;
int main()
{
    cout << "what is the color of your eyes ? (use capitalization)" << endl << "colors to choose from are " << endl << "Blue" << endl << "Green" << endl << "Brown";
    cin >> color;

    if (color == Blue); {
        cout << "you are an intelligent person " << endl;
        system("pause");
    }
    else if (color == …
Run Code Online (Sandbox Code Playgroud)

c++ if-statement

-2
推荐指数
1
解决办法
214
查看次数

标签 统计

c++ ×1

if-statement ×1