add
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user