Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Dado um ângulo em graus, minutos e segundos (exemplo: 31◦ 12′ 73′′), converta ele para radianos.
- // In a full circle there are 360 degrees. Each degree is split up into 60 parts, each part being 1/60 of a degree. These parts are called minutes. Each minute is split up into 60 parts, each part being 1/60 of a minute. These parts are called seconds.
- // círculo: 360 graus. 1/60 graus = minutos. 1/60 minutos = segundos.
- #include <stdio.h>
- #include <math.h>
- #define pi M_PI
- int main(void)
- {
- double grau,g,min,rad,s,m;
- printf("\nDigite o ângulo deste modo: grauºminuto'segundo''. \n");
- scanf("%lfº%lf'%lf''",&grau,&min,&s);
- s=(1/60)*m;
- m=min+s;
- min=(1/60)*g;
- g=(pi/180)*rad+min;
- rad=
- y=
- printf("\nO ângulo correspondente em radianos é: %lf \n\n",rad);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement