# C++每日一题 Day 3 理五的凡尔赛风气

***

lhy版权所有，禁止转载

### 知识点：逻辑运算符，布尔类，选择结构

***

## 题目描述

数学成绩刚出但还没发布，4个理五班的同学都说自己考的差。于是他们决定按他们宣称的成绩从低到高站好，等老胡宣读他们的真实成绩。现在输入这4个同学的成绩（4个空格隔开的整数），如果他们的成绩依次递增，则输出“nb”，否则输出“烟雾弹！凡尔赛！”

## 输入

四个整数

## 输出

题目要求的字符串

## 输入输出样例

**输入**

```
150 129 139 145
```

**输出**

```
烟雾弹！凡尔赛！
```

***

## 回答要求

* 附上你完成本程序的完整代码
* 说说if的作用。
* 你的代码是否非常复杂？如果是，请学习“逻辑运算符”。
* 讲讲各种逻辑运算符的作用。
* 拓展：c++中引入了新的一种类型字符串（string），尝试用String储存数据重新完成本题。（可能需要一些数组的知识，可以不做）

  c++中提供了一种新的基本数据类型，叫布尔类（或者逻辑类）。尝试在本题定义一个布尔变量，然后用它储存理五的同学是否凡尔赛。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.mcyou.cc/c++-mei-ri-yi-ti/c++-mei-ri-yi-ti-day-3-fan-er-sai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
