Sunday, June 4, 2017

Product of Two Numbers in Fortran

Here is a sample program that will ask the user to give two numbers and then our program will compute the product of the two numbers using FORTRAN as our programming language.

Thank you.

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.



Sample Program Output


Program Listing

program product                                      
         
    integer :: solve_product,x,y
    
    print  *, ''   
    print  *, 'Product of Two Numbers in Fortran'
    print  *, ''                                      
  print  *, 'Enter two numbers'                       
  read  *, x,y                                          
                                   
  solve_product=x*y   
    print  *, ''                                          
  print  *, 'The product of ',x, ' and ',y, ' is ' ,solve_product,'.'  
    print  *, ''     
    print  *, 'End of Program'                        
end  program product                                   
  

No comments:

Post a Comment