DEV/DEV1.1/TP06/disque.c
2022-10-12 16:41:20 +02:00

24 lines
302 B
C

#include <stdio.h>
#include <stdlib.h>
int main(void){
int h = 0;
int x;
int y;
printf("Rentrer le rayon: ");
scanf("%d",&h);
for(x=-(h);x<h;x++){
for(y=-(h);y<h;y++){
if((x*x+y*y)<h*h){
printf("* ");
}
else{
printf(" ");
}
}
printf("\n");
}
return EXIT_SUCCESS;
}