This commit is contained in:
2026-06-15 09:00:38 +08:00
parent fec66377d5
commit 4640c5e02b
191 changed files with 6046 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#include <stdio.h>
void printNumber2(int n)
{
if (n > 9)
{
printNumber2(n / 10);
}
printf("%d", n % 10);
}
int main()
{
int number = 12345; // Example number
printNumber2(number);
printf("\n"); // Newline for better output formatting
char *str = "abcde";
printf("%s\n", str); // 输出: abcde
char arr[] = "abcde";
printf("%s\n", arr); // 输出: abcde
return 0;
}
Binary file not shown.
+16
View File
@@ -0,0 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
char* getStar(int n) {
if (n < 0) {
return "*";
} else {
return getStar(n - 1);
}
}
int main() {
int n = 5;
printf("%s\n", getStar(n));
return 0;
}
Binary file not shown.