Let’s sum the following
series
Here we see that there is no
sequence in the series. In this case the solution is
1234567890
Sum=0.0
Do k=1,6
Write(*,*) 'Enter the value of
x'
Read(*,*) x
Sum=sum+x
End do
Write(*,*) 'The sum of the above
series is =',sum
End
(Here the result is 48.) . Just
copy this program and paste this in your Force2.0 and run . Put the values of x
that is 5 then press enter then put 9 and in the same way put 3,10,7 and 14 and
press enter . The output will be (The sum of above series is = 48.)
Let’s try yourself

Here do k=1,5
As the series have 5 values

No comments:
Post a Comment