Saturday, November 24, 2012

Math of division in Fortran





সমীকরণটি সমাধান কর। যেখানে x=0.43 এবং z=0.50
1234567890                                                                                  
              Write(*,*) 'enter the value of x'     
               Read(*,*) x
               Write(*,*) 'enter the value of z'
               Read(*,*) z
               Y=(x**2/3)+(4/z**0.55)
                Write(*,*) 'the result of Y is =',Y
               End
বন্ধুরা তোমরা এখান থেকে program এর অংশটি copy করে Force2.0 paste করে just run কর। তারপর যে x এর মান put করে Enter দিয়ে এবং z এর মান put করে Enter দিলে যে result টি হবে তা হল (the result of Y is =  5.91797638)
Let’s try yourself this problem

where x=2.2 and z= 3
It’s fortran expression is Y=(x**4/2)-(z/3)
                              and the result is 2.42000008

No comments:

Post a Comment