adding curly brackets

This commit is contained in:
Jidong Xiao
2025-01-31 13:47:02 -05:00
committed by JamesFlare1212
parent c1f2ef05a7
commit e6b2bb69ef

View File

@@ -129,18 +129,22 @@ for (int i=0; i<n; ++i){
2. 2.
```cpp ```cpp
int count=0; int count=0;
for (int i=0; i<n; ++i) for (int i=0; i<n; ++i){
++count; ++count;
for (int j=0; j<n; ++j) }
for (int j=0; j<n; ++j){
++count; ++count;
}
``` ```
3. 3.
```cpp ```cpp
int count=0; int count=0;
for (int i=0; i<n; ++i) for (int i=0; i<n; ++i){
for (int j=i; j<n; ++j) for (int j=i; j<n; ++j){
++count; ++count;
}
}
``` ```
## 7.9 Recursive Definitions of Factorials and Integer Exponentiation ## 7.9 Recursive Definitions of Factorials and Integer Exponentiation