/*************************************************************************/
/* POISSON3.C */
/* Calculate poisson statistics given average number of occurences */
/* and the value of interest. */
/* Uses the formula P(X=x) = mu^x * e^-mu/x!, for x = 1,2,3...x */
/* NOTICE: Factorial1() is copyrighted by author */
/* FURTHERMORE: Software is provided as is, with no promise of fitness */
/* for use. */
/* comments or questions: p_duke52@Yahoo.com */
/* Have fun... */
/* PAD, May 25, 2008 */
/*************************************************************************/ #include <stdio.h>
#include <math.h> /* protype of "e", exp(x) == exp^x */
#include <conio.h> /* For clrscr() */ /*********************************************************\
// copyrighted by author
// Written by: Jaco van Staden
// Date: 13 July 2002
// Program: Maths Program
// from the file "A_maths_me1067647162002.zip"
// available at Planet Source Code:
// http://www.planet-source-code.com
// changed int to double for size issues
// -- PAD, 5/25/08
\**********************************************************/ double Factorial1 (double a)
{
double answer = 1.0;
while(a>1)
answer *= a--;
return answer;
} int main(void)
{
double result, res1, res2;
double i = 0.0, k = 0.00;
double answer = 0.0; result = res1 = res2 = 0.0; clrscr(); /* makes it easier to see input prompts */ printf("Enter mean: ");
scanf("%lf", &i); printf("Enter value of interest: ");
scanf("%lf", &k); /* factorial of value of interest */ answer = Factorial1(k); /* formula for k */
result = pow(i,k);
res1 = 1/(exp(k));
res2 = (result * res1) / answer; printf("answer is ... : %0.20lf", res2);
return 0;
} /*************************************************************************/
/* POISSON3.C */
/* Calculate poisson statistics given average number of occurences */
/* and the value of interest. */
/* Uses the formula P(X=x) = mu^x * e^-mu/x!, for x = 1,2,3...x */
/* NOTICE: Factorial1() is copyrighted by author */
/* FURTHERMORE: Software is provided as is, with no promise of fitness */
/* for use. */
/* comments or questions: p_duke52@yahoo.com */
/* Have fun... */
/* PAD, May 25, 2008 */
/*************************************************************************/ #include <stdio.h>
#include <math.h> /* protype of "e", exp(x) == exp^x */
#include <conio.h> /* For clrscr() */ /*********************************************************\
// copyrighted by author
// Written by: Jaco van Staden
// Date: 13 July 2002
// Program: Maths Program
// from the file "A_maths_me1067647162002.zip"
// available at Planet Source Code:
// http://www.planet-source-code.com
// changed int to double for size issues
// -- PAD, 5/25/08
\**********************************************************/ double Factorial1 (double a)
{
double answer = 1.0;
while(a>1)
answer *= a--;
return answer;
} int main(void)
{
double result, res1, res2;
double i = 0.0, k = 0.00;
double answer = 0.0; result = res1 = res2 = 0.0; clrscr(); /* makes it easier to see input prompts */ printf("Enter mean: ");
scanf("%lf", &i); printf("Enter value of interest: ");
scanf("%lf", &k); /* factorial of value of interest */ answer = Factorial1(k); /* formula for k */
result = pow(i,k);
res1 = 1/(exp(k));
res2 = (result * res1) / answer; printf("answer is ... : %0.20lf", res2);
return 0;
}
What type of a program is used in order to enter C source code
Not possible.
A source code file is a plain-text file containing C++ instructions. The instructions must be compiled and linked to create a native machine code executable.
sravanthi
code source de dsr sous omnet++4.1 en .cc
C is a programming language, so it doesn't have source code.(On the other hand, C compilers do have source code, but you, as a beginner in programming, could not understand them.)
All C++ source code is is a text file with the .cpp extension. So if you save your code as *****.cpp then it is automatically C++ source code.
What is the source code for scientific calculator in c?Read more: What_is_the_source_code_for_scientific_calculator_in_c
You have to ask Microsoft for the source code
To convert source code (.c file) to an executable (.exe) file you have to use a compiler, which is a translator of source code to machine code.
Turbo C compiles c source. turbo c++ compiles c++ source code.
The source code, in C, will depend on what type of lossless compression algorithm will be used. A source code should be available from various computer scientists in your area.
What type of a program is used in order to enter C source code
Not possible.
A source code file is a plain-text file containing C++ instructions. The instructions must be compiled and linked to create a native machine code executable.
It means that the source code of PHP (not PHP code, but the C/C++ code used to build the PHP binary) is published and available to anyone. It also means that anyone can contribute fixes and improvements to the source code.Read more here: open-source
sravanthi