program mpadilla26HW04_04 implicit none real, dimension(20):: array_a real, dimension(5,5):: array_f,array_g integer::x array_a= (/0.2481, 0.4133, 0.4961, 0.4618,& 0.3686, -0.0495, -0.3477, -0.4219, & -0.4954, -0.4156, -0.4162, 0.3258,& -0.0574, 0.2749, -0.1003, -0.2711,& 0.0383, -0.3934, 0.3173, -0.2402/) array_f=reshape(array_a, [5,5], [0.0,0.0,0.0,0.0,0.0]) print*, 'Second array, padded, using default order:' do x=1,5 print "(1A4, 5F8.4)" , 'R:', array_f(x,:) end do array_g=reshape(array_a, [5,5], [0.0,0.0,0.0,0.0,0.0],[2,1]) print*, 'Third array, padded, filling columns first:' do x=1,5 print "(1A4, 5F8.4)" , 'C:', array_g(x,:) end do end program mpadilla26HW04_04
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more