#include <stdio.h>
long factorial(int n) {
long result = 1;
for (int i = 1; i <= n; ++i)
result *= i;
return result;
}
int main ()
{
double n=0;
int i;
for (i=0; i<=32; i++) {
n=(1.0/factorial(i))+n;
}
printf("%.32f\n", n);
}
//2.71828182845904553488480814849027
try this---> http://c-pgms.blogspot.com/2008/08/program-to-find-meanmedianand-mode_22.html
Yes, do write, or if you're too lazy to your homework, use google.
int matrix[][]; // the matrix to find the max in int max = matrix[0][0]; int r,c; for(r = 0; r < 3; ++r) { for(c = 0; c < 3; ++c) { if(matrix[r][c] > max) { max = matrix[r][c]; } } } // max is now the maximum number in matrix
see the program
program to find maximum of two numbers using pointers
find the program in c-pgms.blogspot.com
Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11
For first find an example program.
try this---> http://c-pgms.blogspot.com/2008/08/program-to-find-meanmedianand-mode_22.html
find the area of abc a[2,3] c[6,0]
Oh, well, simply: max = (a + b + c * 2 + abs(a - b) + abs(a + b - c * 2 + abs(a - b))) / 4;
Write a C program called MonthDays to find the number of days in a given month Test your code with different input values to demonstrate that your function is robust?
find median of n observation in c program
Yes, do write, or if you're too lazy to your homework, use google.
write a c++ program to convert binary number to decimal number by using while statement
int matrix[][]; // the matrix to find the max in int max = matrix[0][0]; int r,c; for(r = 0; r < 3; ++r) { for(c = 0; c < 3; ++c) { if(matrix[r][c] > max) { max = matrix[r][c]; } } } // max is now the maximum number in matrix
largestNum = 0; for ( i = 0; i < 10 ; i++) { if ( currentNum[i] > largestNum) largestNum = currentNum[i]; }