> For the complete documentation index, see [llms.txt](https://blog.mcyou.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.mcyou.cc/c++-mei-ri-yi-ti/c-mei-ri-yi-ti-day-3-fan-er-sai.md).

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

***

lhy版权所有，禁止转载

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

***

## 题目描述

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

## 输入

四个整数

## 输出

题目要求的字符串

## 输入输出样例

**输入**

```
150 129 139 145
```

**输出**

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

***

## 回答要求

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

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` 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>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
