Merge pull request #430 from tanducmai/fix-ordinal-numbers

docs: fix ordinal numbers '1th' and '2th'
This commit is contained in:
Fechin authored and GitHub committed 2023-06-01 11:04:49 +08:00
commit 541a703dcc
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -171,14 +171,14 @@ Awk Variables
|---------------------|------------------------------------|
| `$1 == "root"` | First field equals root |
| `{print $(NF-1)}` | Second last field |
| `NR!=1{print $0}` | From 2th record |
| `NR!=1{print $0}` | From 2nd record |
| `NR > 3` | From 4th record |
| `NR == 1` | First record |
| `END{print NR}` | Total records |
| `BEGIN{print OFMT}` | Output format |
| `{print NR, $0}` | Line number |
| `{print NR " " $0}` | Line number (tab) |
| `{$1 = NR; print}` | Replace 1th field with line number |
| `{$1 = NR; print}` | Replace 1st field with line number |
| `$NF > 4` | Last field > 4 |
| `NR % 2 == 0` | Even records |
| `NR==10, NR==20` | Records 10 to 20 |
+1 -1
View File
@@ -213,7 +213,7 @@ std::array<int, 6> marks = {92, 97, 98, 99, 98, 94};
// Print first element
std::cout << marks[0];
// Change 2th element to 99
// Change 2nd element to 99
marks[1] = 99;
// Take input from the user