sábado, 31 de agosto de 2019

True legend Dennis Ritchie, vs bill gates and steve jobs & Installing gfortran in centos

C     SOLVE QUADRATIC EQUATION IN FORTRAN I
      READ 100,A,B,C
100   FORMAT(3F12.4)
      DISCR = B**2-4*A*C
      IF (DISCR) 10,20,30
10    X1=(-B)/(2.*A)
      X2=SQRTF(ABSF(DISCR))/(2.*A)
      PRINT 110,X1,X2
110   FORMAT(5H X = ,F12.3,4H +i ,F12.3)
      PRINT 120,X1,X2
120   FORMAT(5H X = ,F12.3,4H -i ,F12.3)
      GOTO 40
20    X1=(-B)/(2.*A)
      PRINT 130,X1
130   FORMAT(11H X1 = X2 = ,F12.3)
      GOTO 40
30    X1=((-B)+SQRTF(ABSF(DISCR)))/(2.*A)
      X2=((-B)-SQRTF(ABSF(DISCR)))/(2.*A)
      PRINT 140,X1
140   FORMAT(6H X1 = ,F12.3)
      PRINT 150,X2
150   FORMAT(6H X2 = ,F12.3)
40    CONTINUE
      STOP 25252  

Program tem_conversion

!Purpose, conevrt kelvin to frenheit

IMPLICIT NONE

REAL :: temp_f

REAL :: temp_k

WRITE(*,*) 'Enter the temperature in Fehreheit: '
READ(*,*) temp_f

!Cnevrt to kelvins

temp_k = (5./ 9.)*(temp_f-32.) + 273.15

WRITE(*,*) temp_f, 'temperature in Fehreheit: ', temp_k, 'kelvins'


END PROGRAM



True legends last













Exiting on user cancel.
[root@localhost alexdey]# yum install gcc-fortran
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.cs.vt.edu
 * extras: repo1.dal.innoscale.net
 * updates: centos.host-engine.com
No package gcc-fortran available.
Error: Nothing to do
[root@localhost alexdey]# yum install gfortran
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.cs.vt.edu
 * extras: repo1.dal.innoscale.net
 * updates: centos.host-engine.com
No package gfortran available.
Error: Nothing to do
[root@localhost alexdey]# yum install gcc-gfortran
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.cs.vt.edu
 * extras: repo1.dal.innoscale.net
 * updates: centos.host-engine.com
Resolving Dependencies
--> Running transaction check
---> Package gcc-gfortran.x86_64 0:4.8.5-36.el7_6.2 will be installed
--> Processing Dependency: libquadmath-devel = 4.8.5-36.el7_6.2 for package: gcc-gfortran-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: libquadmath = 4.8.5-36.el7_6.2 for package: gcc-gfortran-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: libgfortran = 4.8.5-36.el7_6.2 for package: gcc-gfortran-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: gcc = 4.8.5-36.el7_6.2 for package: gcc-gfortran-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: libgfortran.so.3()(64bit) for package: gcc-gfortran-4.8.5-36.el7_6.2.x86_64
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-28.el7_5.1 will be updated
---> Package gcc.x86_64 0:4.8.5-36.el7_6.2 will be an update
--> Processing Dependency: libgomp = 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: cpp = 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: libgcc >= 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
---> Package libgfortran.x86_64 0:4.8.5-36.el7_6.2 will be installed
---> Package libquadmath.x86_64 0:4.8.5-36.el7_6.2 will be installed
---> Package libquadmath-devel.x86_64 0:4.8.5-36.el7_6.2 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-28.el7_5.1 will be updated
---> Package cpp.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package libgcc.x86_64 0:4.8.5-28.el7_5.1 will be updated
---> Package libgcc.x86_64 0:4.8.5-36.el7_6.2 will be an update
---> Package libgomp.x86_64 0:4.8.5-28.el7_5.1 will be updated
---> Package libgomp.x86_64 0:4.8.5-36.el7_6.2 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch        Version                  Repository    Size
================================================================================
Installing:
 gcc-gfortran           x86_64      4.8.5-36.el7_6.2         updates      6.7 M
Installing for dependencies:
 libgfortran            x86_64      4.8.5-36.el7_6.2         updates      300 k
 libquadmath            x86_64      4.8.5-36.el7_6.2         updates      189 k
 libquadmath-devel      x86_64      4.8.5-36.el7_6.2         updates       53 k
Updating for dependencies:
 cpp                    x86_64      4.8.5-36.el7_6.2         updates      5.9 M
 gcc                    x86_64      4.8.5-36.el7_6.2         updates       16 M
 libgcc                 x86_64      4.8.5-36.el7_6.2         updates      102 k
 libgomp                x86_64      4.8.5-36.el7_6.2         updates      158 k

Transaction Summary
================================================================================
Install  1 Package  (+3 Dependent packages)
Upgrade             ( 4 Dependent packages)

Total size: 30 M
Total download size: 7.2 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): libquadmath-devel-4.8.5-36.el7_6.2.x86_64.rpm       |  53 kB   00:01     
(2/4): libquadmath-4.8.5-36.el7_6.2.x86_64.rpm             | 189 kB   00:01     
(3/4): libgfortran-4.8.5-36.el7_6.2.x86_64.rpm             | 300 kB   00:01     
(4/4): gcc-gfortran-4.8.5-36.el7_6.2.x86_64.rpm            | 6.7 MB   00:04     
--------------------------------------------------------------------------------
Total                                              1.6 MB/s | 7.2 MB  00:04     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libquadmath-4.8.5-36.el7_6.2.x86_64                         1/12 
  Updating   : libgcc-4.8.5-36.el7_6.2.x86_64                              2/12 
  Installing : libgfortran-4.8.5-36.el7_6.2.x86_64                         3/12 
  Updating   : libgomp-4.8.5-36.el7_6.2.x86_64                             4/12 
  Updating   : cpp-4.8.5-36.el7_6.2.x86_64                                 5/12 
  Updating   : gcc-4.8.5-36.el7_6.2.x86_64                                 6/12 
  Installing : libquadmath-devel-4.8.5-36.el7_6.2.x86_64                   7/12 
  Installing : gcc-gfortran-4.8.5-36.el7_6.2.x86_64                        8/12 
  Cleanup    : gcc-4.8.5-28.el7_5.1.x86_64                                 9/12 
  Cleanup    : cpp-4.8.5-28.el7_5.1.x86_64                                10/12 
  Cleanup    : libgcc-4.8.5-28.el7_5.1.x86_64                             11/12 
  Cleanup    : libgomp-4.8.5-28.el7_5.1.x86_64                            12/12 
  Verifying  : cpp-4.8.5-36.el7_6.2.x86_64                                 1/12 
  Verifying  : libquadmath-4.8.5-36.el7_6.2.x86_64                         2/12 
  Verifying  : libgfortran-4.8.5-36.el7_6.2.x86_64                         3/12 
  Verifying  : libgcc-4.8.5-36.el7_6.2.x86_64                              4/12 
  Verifying  : libgomp-4.8.5-36.el7_6.2.x86_64                             5/12 
  Verifying  : gcc-gfortran-4.8.5-36.el7_6.2.x86_64                        6/12 
  Verifying  : gcc-4.8.5-36.el7_6.2.x86_64                                 7/12 
  Verifying  : libquadmath-devel-4.8.5-36.el7_6.2.x86_64                   8/12 
  Verifying  : libgomp-4.8.5-28.el7_5.1.x86_64                             9/12 
  Verifying  : libgcc-4.8.5-28.el7_5.1.x86_64                             10/12 
  Verifying  : gcc-4.8.5-28.el7_5.1.x86_64                                11/12 
  Verifying  : cpp-4.8.5-28.el7_5.1.x86_64                                12/12 

Installed:
  gcc-gfortran.x86_64 0:4.8.5-36.el7_6.2                                        

Dependency Installed:
  libgfortran.x86_64 0:4.8.5-36.el7_6.2                                         
  libquadmath.x86_64 0:4.8.5-36.el7_6.2                                         
  libquadmath-devel.x86_64 0:4.8.5-36.el7_6.2                                   

Dependency Updated:
  cpp.x86_64 0:4.8.5-36.el7_6.2          gcc.x86_64 0:4.8.5-36.el7_6.2          
  libgcc.x86_64 0:4.8.5-36.el7_6.2       libgomp.x86_64 0:4.8.5-36.el7_6.2      

Complete!
[root@localhost alexdey]# 

No hay comentarios:

Publicar un comentario

Blogger Widgets