C++ Poisson
00.35 | Author: Sueb Zains
Program berikut adalah program poisson. Silahkan untuk memahami.

#include <conio.h>
#include <iostream.h>
#include <math.h>

void main ()
{
   int x,mu,exp_mu,mu_x,x_fak,P_Pois,fak_x,i;
   cout<<"Inputkan x    = ";

  
   cout<<"Inputkan mu = ";
   cin>>mu;
   exp_mu = exp(mu);
   mu_x = pow(mu,x);
   fak_x = 1;
   for (i=x;i>=1;i--)
   {
       fak_x = fak_x*i;
   }
   x_fak = fak_x;
   P_Pois = (exp_mu*mu_x)/x_fak;
   cout<<"P_Pois = "<<P_Pois;
   getch();
}


Semoga bermanfaat.......))
This entry was posted on 00.35 and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

0 komentar: