nr\m;laeoh9y0m g.qthnedxc
In fortran:
do i=1,5
write(6,*)i
enddo
stop
end
This program will write the numbers 1 to 5 on the screen.
Wiki User
∙ 2013-01-25 10:43:32If 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 factorial(int n) { int i; int f=1; for(i=2;i<=n;++i) f*=i; return f; }
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 !!!
Prime numbers are numbers that are only divisible by themselves and the number 1. You can write a program to print all prime numbers from 1 to 100 in FoxPro.
using the function norm(A,x) where A is the matrix/vector that you have to compute the norm for and x can be 1,2,inf, or 'fro' to compute the 1-norm, 2-norm, infinite-norm and frobenius norm respectively.
PRINT 2,3,5,7,11,13,17,19,23,29,31,37
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 factorial(int n) { int i; int f=1; for(i=2;i<=n;++i) f*=i; return f; }
$n = 10*(1+10)/2;
int x= 1; int y= 2;
2 (i.e., 0 or 1)
101
You can do this easily in a "for" loop. The relevant part of the program looks like this: for (number = 1; number <= 100; number++){ System.out.println(number); }
#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
/*** returns N!, assume N >= 0 ***/ int Factorial(int n) { if (n <=1 ) /* 0! = 1! = 1 */ return 1; /** you can place as many know values as you want, like 2!, 3!, etc **/ /** but, recursive call will do just fine, ... **/ return n * Factorial(n - 1); /** compute N * (N-1)! **/ }
1/16