debut TP11
This commit is contained in:
16
DEV1.1/TP10/arctique.c
Normal file
16
DEV1.1/TP10/arctique.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
int main(void) {
|
||||
double point_x,point_y,angle,distance;
|
||||
printf("Donnez la distance à l'origine : ");
|
||||
scanf("%lf",&distance);
|
||||
printf("Donnez l'angle par rapport à l'axe des abscisses : ");
|
||||
scanf("%lf",&angle);
|
||||
point_x=distance*cos(angle);
|
||||
point_y=distance*sin(angle);
|
||||
printf("coordonné x du point : %f \n",point_x);
|
||||
printf("coordonné y du point : %f \n",point_y);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user