Unverified Commit 7d568803 authored by ouuan's avatar ouuan Committed by GitHub
Browse files

Apply suggestions from code review



Co-Authored-By: default avatarXeonacid <h.dwwwwww@gmail.com>
parent b8036963
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ int main() {
```

??? note "什么是 include?"
     `#include` 其实是一个预处理命令,意思为将一个文件“放”在这条语句处。也就是说,在编译时,编译器会“复制” `iostream` 头文件中的内容,“粘贴”到 `#include <iostream>` 这条语句处。这样,你就可以使用 `iostream` 中提供的 `cin``cout``endl` 等对象了。
     `#include` 其实是一个预处理命令,意思为将一个文件“放”在这条语句处。也就是说,在编译时,编译器会“复制” `iostream` 头文件中的内容,“粘贴”到 `#include <iostream>` 这条语句处。这样,你就可以使用 `iostream` 中提供的 `std::cin``std::cout``std::endl` 等对象了。

    一般来说,应当根据你需要使用的 C++ 内置的函数、对象来确定你要 `#include` 哪些头文件。但如果你 `#include` 了多余的头文件,也不会造成什么影响(可能会略微减慢编译速度)。

@@ -28,7 +28,7 @@ int main() {

    最后的 `return 0;` 表示程序运行成功。默认情况下,程序结束时返回 0 表示一切正常,否则表示错误代码。这个值返回给谁呢?其实就是调用你写的程序的系统或外部程序,它会在你的程序结束时接收到这个返回值。

    在 OI 中,程序的返回值不为会导致运行时错误(RE)。
    在 OI 中,程序的返回值不为 0 会导致运行时错误(RE)。

## 注释

@@ -127,7 +127,7 @@ int main() {

1.   `%s` 表示字符串。
2.   `%c` 表示字符。
3.   `%lf` 表示浮点数
3.   `%lf` 表示双精度浮点数( `double`
4.   `%lld` 表示长整型 ( `long long` )。根据系统不同,也可能是 `%I64d`
5.   `%u` 表示无符号整型  ( `unsigned int` )。
6.   `%ull` 表示无符号长整型 ( `unsigned long long` )。