int factorial(int n) { int i; int f=1; for(i=2;i<=n;++i) f*=i; return f; }
If by compute a fraction you mean simplify a fraction such as 1/4 to something like 0.25, you simply divide the top number by the bottom number (numerator by denominator). For the example of 1/4, divide 1 by 4 and you will get 0.25.
$n = 10*(1+10)/2;
Well i think your just a 1 grade trying to solve your homework on the compute well guess what I'm not going to give you the answer it is 17
main() { sum=0; float avg=0.0; int sqr[10]; for(i=1;i<=10;i++) { sqr[i]=(i*i); } for(i=1;i<=10;i++) { sum=sum+sqr[i]; } avg=sum/10; dts it !!!
PRINT 2,3,5,7,11,13,17,19,23,29,31,37
int factorial(int n) { int i; int f=1; for(i=2;i<=n;++i) f*=i; return f; }
If by compute a fraction you mean simplify a fraction such as 1/4 to something like 0.25, you simply divide the top number by the bottom number (numerator by denominator). For the example of 1/4, divide 1 by 4 and you will get 0.25.
int x= 1; int y= 2;
$n = 10*(1+10)/2;
2 (i.e., 0 or 1)
#include ...double x, y;...y = cosh (x);
To find 2 1/2% of a number, multiply the given number by the 0.025 which is the decimal equivalent of 2 1/2. Example: Compute for 2 1/2 of 200. = 0.025 * 200 = 5
#include<stdio.h> #include<conio.h> void main() { int n,count=0,sum=0; printf("Enter the number of values"); scanf("%d",&n); for(int i=1;count<n;i++) { sum+=i*i; count++; } getch(); }
Well i think your just a 1 grade trying to solve your homework on the compute well guess what I'm not going to give you the answer it is 17
1/16
main() { sum=0; float avg=0.0; int sqr[10]; for(i=1;i<=10;i++) { sqr[i]=(i*i); } for(i=1;i<=10;i++) { sum=sum+sqr[i]; } avg=sum/10; dts it !!!