This commit is contained in:
QuangNguyenMinh123
2025-11-07 21:25:32 +07:00
parent 6351885775
commit 15fd277e9d
3 changed files with 26 additions and 11 deletions
+9
View File
@@ -46,6 +46,15 @@
*
*/
int factorial(int n) {
struct structTetst testStruct = {-2, "test", {-1, "childTest"}};
testStruct.id ++;
testStruct.id ++;
testStruct.id ++;
int abc = 0;
abc ++;
abc *= 2;
testStruct.child.childId ++;
testStruct.child.childString = "childTest " + std::to_string(abc);
if (n <= 1) return 1;
return n * factorial(n - 1);
}