commit 2b3a7cb677f34f9c95f4e1746469b2652e9e03d8 Author: Vincent Batts Date: Fri Nov 10 15:55:50 2023 -0500 Initial commit Signed-off-by: Vincent Batts diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bedb82c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM r.batts.cloud/debian:bookworm + +RUN apt update && \ + apt install -y build-essential gnucobol gdb gfortran diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6cae566 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2024 vbatts + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..81dc5fd --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ + +build: Dockerfile + docker build -t r.batts.cloub/fortran . + +run: build + docker run -it --rm -v $(pwd):/data r.batts.cloud/fortran diff --git a/README.md b/README.md new file mode 100644 index 0000000..578f758 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# tmp.fortran + diff --git a/hello.f90 b/hello.f90 new file mode 100644 index 0000000..e90aeda --- /dev/null +++ b/hello.f90 @@ -0,0 +1,25 @@ +program artimetic + implicit none + + real :: pi + real :: radius + real :: height + real :: area + real :: volume + + pi = 3.1415927 + + print *, 'Enter cylinder base radius:' + read(*,*) radius + + print *, 'Enter cylindcer height:' + read(*,*) height + + area = pi * radius**2 + volume = area * height + + print *, 'Cylinder radius is: ', radius + print *, 'Cylinder height is: ', height + print *, 'Cylinder base area is: ', area + print *, 'Cylinder volume is: ', volume +end program artimetic