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.
Chat with our AI personalities
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;
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 !!!