Sha256: b85a64a04da57acb555a00bce9d1f11d0e6e2b0e6f5c1dd313d5a7f3d5cfc326
Contents?: true
Size: 670 Bytes
Versions: 213
Compression:
Stored size: 670 Bytes
Contents
module difference_of_squares contains integer function square_of_sum(n) implicit none integer :: i,n square_of_sum = 0 do i = 1,n square_of_sum = square_of_sum + i end do square_of_sum = square_of_sum * square_of_sum end function square_of_sum integer function sum_of_squares(n) implicit none integer :: i, n sum_of_squares = 0 do i = 1,n sum_of_squares = sum_of_squares + i**2 end do end function sum_of_squares integer function difference(n) implicit none integer :: n difference = square_of_sum(n) - sum_of_squares(n) end function difference end module difference_of_squares
Version data entries
213 entries across 213 versions & 1 rubygems