DEV/DEV1.1/TP06/disque.c

24 lines
302 B
C
Raw Normal View History

2022-10-12 16:41:20 +02:00
#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;
}