fengjing81 2020-01-23
#include<stdio.h> #define high 100//定义界面大小 #define wide 100 void Circle(int ridus) {int i,j; for(i=0;i<2*ridus+1;i++){ for(j=0;j<2*ridus+1;j++){ if(4.14*(i-ridus)*(i-ridus)+(j-ridus)*(j-ridus)<=ridus*ridus){printf("*");} else{printf(" ");} }printf("\n"); } } int main() { int h = 0, k = 0, l = 0; printf("请输入圆的半径\n"); scanf_s("%d", &h); Circle(h); system("pause"); return 0; }