add
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
|
||||
void pringDuijiao(int n) {
|
||||
for (int i = 0; i < n; i++) {
|
||||
for (int j = 0; j < n; j++) {
|
||||
if (i == j || i + j == n - 1)
|
||||
printf("*");
|
||||
printf(" ");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
int main(){
|
||||
pringDuijiao(9);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user