First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
This commit is contained in:
commit
1e05ecd7ee
781 changed files with 9080 additions and 0 deletions
12
Task/FizzBuzz/Fortran/fizzbuzz-2.f
Normal file
12
Task/FizzBuzz/Fortran/fizzbuzz-2.f
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
program fizzbuzz_select
|
||||
integer :: i
|
||||
|
||||
do i = 1, 100
|
||||
select case (mod(i,15))
|
||||
case 0; print *, 'FizzBuzz'
|
||||
case 3,6,9,12; print *, 'Fizz'
|
||||
case 5,10; print *, 'Buzz'
|
||||
case default; print *, i
|
||||
end select
|
||||
end do
|
||||
end program fizzbuzz_select
|
||||
11
Task/FizzBuzz/Fortran/fizzbuzz.f
Normal file
11
Task/FizzBuzz/Fortran/fizzbuzz.f
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
program fizzbuzz_if
|
||||
integer :: i
|
||||
|
||||
do i = 1, 100
|
||||
if (mod(i,15) == 0) then; print *, 'FizzBuzz'
|
||||
else if (mod(i,3) == 0) then; print *, 'Fizz'
|
||||
else if (mod(i,5) == 0) then; print *, 'Buzz'
|
||||
else; print *, i
|
||||
end if
|
||||
end do
|
||||
end program fizzbuzz_if
|
||||
Loading…
Add table
Add a link
Reference in a new issue