编辑代码

#include <stdio.h>
int main () {
    int a = 3;
    int l , m , n;
    l = 1;
    m = (a+1)/2 ;
    n = a ;
    int b ;
    int x = 1;
    while(a>0){
        while(n>0){
            b=(m-l)*(m-l);
            while(x*x<=b){
                printf("o");
                x++;
            }
            x = 1 ;
            x = l ;
            while((x*x)>=b){
                printf("*");
                x=x-1;
            }
            x = 1 ;
            while(x*x<=b){
                printf("o");
                x++;
            }
            x = 0 ;
            printf("\n");
            l++;
            n--;
        }
        a--;
    }
}