luizaspan icon

oblato nuclear teste

luizaspan | PRO | 08/17/17 12:29:42 PM UTC | 0 ⭐ | 708 👁️ | Never ⏰ | []
C |

570 B

|

None

|

0 👍

/

0 👎

// definir variáveis beta, gamma, theta, phi
 
// beta=0.8
// gamma=0 (graus)
 
// com theta variando entre 0 e phi e phi variando entre 0 e 2pi
 
// expressão
 
// print lista r theta phi
 
 
#include <stdio.h>
#include <math.h>
 
 
#define M_PI 3.14159265358979323846
 
int main()
{
    double b, g, t, p, r;
 
    b=0.8;
    g=0;
 
    for (t=0 ; t<=(M_PI/2) ; t+=1)
    {
        for (p = 0; p <= (2*M_PI); p+=1)
        {
            r = 1.0 + b*sqrt(5/(16*M_PI)*(cos(g)*(3*pow(cos(t),2)-1)+(sqrt(3)/2)*sin(g)*pow(sin(t),2)*cos(2*p)));
 
            printf("%f %f %f\n",r,t,g);
        }
    }
 
    return 0;
}

Comments