Skip to content

Commit 5ee2d66

Browse files
committed
Generated Sample Programs website automatically
on-behalf-of: @TheRenegadeCoder <jeremy.grifski@therenegadecoder.com>
1 parent b1670e8 commit 5ee2d66

File tree

6 files changed

+71
-80
lines changed

6 files changed

+71
-80
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
date: 2018-03-15
3-
last-modified: 2025-10-14
3+
last-modified: 2025-10-15
44
layout: default
55
title: Sample Programs in Every Language
66
---

docs/languages/fortran/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: 2018-04-25
33
featured-image: programming-languages.jpg
4-
last-modified: 2025-02-16
4+
last-modified: 2025-10-15
55
layout: default
66
tags:
77
- fortran

docs/languages/index.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: 2018-03-15
33
featured-image: programming-languages.jpg
4-
last-modified: 2025-10-14
4+
last-modified: 2025-10-15
55
layout: default
66
title: Programming Languages
77
---
@@ -18,43 +18,43 @@ Here are the percentages for each language in the collection:
1818

1919
<tr>
2020
<td class="right nowrap">Algol68</td>
21-
<td class="right">7.14%</td>
21+
<td class="right">7.15%</td>
2222
<td class="bar-graph"><div style="width: 100.00%; background-color: #AF425E;"></div></td>
2323
</tr>
2424

2525
<tr>
2626
<td class="right nowrap">Commodore Basic</td>
27-
<td class="right">7.05%</td>
27+
<td class="right">7.06%</td>
2828
<td class="bar-graph"><div style="width: 98.72%; background-color: #4F44D8;"></div></td>
2929
</tr>
3030

3131
<tr>
3232
<td class="right nowrap">Euphoria</td>
33-
<td class="right">6.24%</td>
33+
<td class="right">6.25%</td>
3434
<td class="bar-graph"><div style="width: 87.42%; background-color: #FF790B;"></div></td>
3535
</tr>
3636

3737
<tr>
3838
<td class="right nowrap">Beef</td>
39-
<td class="right">6.01%</td>
39+
<td class="right">6.02%</td>
4040
<td class="bar-graph"><div style="width: 84.19%; background-color: #A52F4E;"></div></td>
4141
</tr>
4242

4343
<tr>
4444
<td class="right nowrap">Pascal</td>
45-
<td class="right">5.09%</td>
45+
<td class="right">5.10%</td>
4646
<td class="bar-graph"><div style="width: 71.34%; background-color: #E3F171;"></div></td>
4747
</tr>
4848

4949
<tr>
5050
<td class="right nowrap">Rust</td>
51-
<td class="right">4.45%</td>
51+
<td class="right">4.46%</td>
5252
<td class="bar-graph"><div style="width: 62.35%; background-color: #DEA584;"></div></td>
5353
</tr>
5454

5555
<tr>
5656
<td class="right nowrap">C</td>
57-
<td class="right">4.41%</td>
57+
<td class="right">4.42%</td>
5858
<td class="bar-graph"><div style="width: 61.81%; background-color: #555555;"></div></td>
5959
</tr>
6060

@@ -66,7 +66,7 @@ Here are the percentages for each language in the collection:
6666

6767
<tr>
6868
<td class="right nowrap">C#</td>
69-
<td class="right">3.92%</td>
69+
<td class="right">3.93%</td>
7070
<td class="bar-graph"><div style="width: 54.95%; background-color: #178600;"></div></td>
7171
</tr>
7272

@@ -96,19 +96,19 @@ Here are the percentages for each language in the collection:
9696

9797
<tr>
9898
<td class="right nowrap">Powershell</td>
99-
<td class="right">2.94%</td>
99+
<td class="right">2.95%</td>
100100
<td class="bar-graph"><div style="width: 41.20%; background-color: #012456;"></div></td>
101101
</tr>
102102

103103
<tr>
104104
<td class="right nowrap">Tcl</td>
105-
<td class="right">2.70%</td>
105+
<td class="right">2.71%</td>
106106
<td class="bar-graph"><div style="width: 37.84%; background-color: #E4CC98;"></div></td>
107107
</tr>
108108

109109
<tr>
110110
<td class="right nowrap">Java</td>
111-
<td class="right">2.50%</td>
111+
<td class="right">2.51%</td>
112112
<td class="bar-graph"><div style="width: 35.04%; background-color: #B07219;"></div></td>
113113
</tr>
114114

@@ -126,7 +126,7 @@ Here are the percentages for each language in the collection:
126126

127127
<tr>
128128
<td class="right nowrap">Go</td>
129-
<td class="right">2.07%</td>
129+
<td class="right">2.08%</td>
130130
<td class="bar-graph"><div style="width: 29.02%; background-color: #00ADD8;"></div></td>
131131
</tr>
132132

@@ -156,13 +156,13 @@ Here are the percentages for each language in the collection:
156156

157157
<tr>
158158
<td class="right nowrap">Perl</td>
159-
<td class="right">0.93%</td>
159+
<td class="right">0.94%</td>
160160
<td class="bar-graph"><div style="width: 13.09%; background-color: #0298C3;"></div></td>
161161
</tr>
162162

163163
<tr>
164164
<td class="right nowrap">X86 64</td>
165-
<td class="right">0.92%</td>
165+
<td class="right">0.93%</td>
166166
<td class="bar-graph"><div style="width: 12.95%; background-color: #6E4C13;"></div></td>
167167
</tr>
168168

@@ -190,12 +190,6 @@ Here are the percentages for each language in the collection:
190190
<td class="bar-graph"><div style="width: 10.36%; background-color: #00B4AB;"></div></td>
191191
</tr>
192192

193-
<tr>
194-
<td class="right nowrap">Fortran</td>
195-
<td class="right">0.68%</td>
196-
<td class="bar-graph"><div style="width: 9.52%; background-color: #4D41B1;"></div></td>
197-
</tr>
198-
199193
<tr>
200194
<td class="right nowrap">Unicat</td>
201195
<td class="right">0.66%</td>
@@ -222,7 +216,7 @@ Here are the percentages for each language in the collection:
222216

223217
<tr>
224218
<td class="right nowrap">Ruby</td>
225-
<td class="right">0.59%</td>
219+
<td class="right">0.60%</td>
226220
<td class="bar-graph"><div style="width: 8.33%; background-color: #701516;"></div></td>
227221
</tr>
228222

@@ -232,6 +226,12 @@ Here are the percentages for each language in the collection:
232226
<td class="bar-graph"><div style="width: 8.19%; background-color: #000080;"></div></td>
233227
</tr>
234228

229+
<tr>
230+
<td class="right nowrap">Fortran</td>
231+
<td class="right">0.55%</td>
232+
<td class="bar-graph"><div style="width: 7.69%; background-color: #4D41B1;"></div></td>
233+
</tr>
234+
235235
<tr>
236236
<td class="right nowrap">Cobol</td>
237237
<td class="right">0.45%</td>
@@ -804,7 +804,7 @@ Here are the percentages for each language in the collection:
804804

805805
<tr>
806806
<td class="right nowrap">Spry</td>
807-
<td class="right">0.02%</td>
807+
<td class="right">0.03%</td>
808808
<td class="bar-graph"><div style="width: 0.35%; background-color: #4451B5;"></div></td>
809809
</tr>
810810

docs/projects/fibonacci/fortran/index.md

Lines changed: 44 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
authors:
33
- Butenkite
4+
- "\u0218tefan-Iulian Alecu"
45
date: 2025-02-16
56
featured-image: fibonacci-in-every-language.jpg
6-
last-modified: 2025-02-16
7+
last-modified: 2025-10-15
78
layout: default
89
tags:
910
- fibonacci
@@ -29,68 +30,58 @@ Welcome to the [Fibonacci](https://sampleprograms.io/projects/fibonacci) in [For
2930
{% raw %}
3031

3132
```fortran
32-
! In program name, - is not allowed
33-
! works until 184 (Stop is not implemented)
3433
program fibonacci
35-
36-
! Create the variables
37-
character(26) :: low = 'abcdefghijklmnopqrstuvwxyz' ! Defines all lowercase letters. This is used to later scan for letters in the input as a test.
38-
character(26) :: cap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! Defines all uppercase letters. This is used to later scan for letters in the input as a test.
39-
integer(kind = 16) :: previousnumber, currentnumber, addednumber, uppers, lowers, loop
40-
character(len=10) :: argument ! Defines the object we will be recieving. It will arrive as a charcters as the expectation is keyboard input.
41-
! Fortran knows that 'argument' is user input, so we never need to set it to anything
42-
43-
! Define variables.
44-
previousnumber = 0
45-
currentnumber = 1
46-
addednumber = 0
47-
48-
IF(COMMAND_ARGUMENT_COUNT().NE.1)THEN
49-
write(*,'(g0.8)')"Usage: please input the count of fibonacci numbers to output"
50-
STOP
51-
ENDIF
52-
53-
CALL GET_COMMAND_ARGUMENT(1,argument)
54-
if (argument == "") then
55-
write(*,'(g0.8)')"Usage: please input the count of fibonacci numbers to output"
56-
STOP
57-
endif
58-
59-
! Tests to make sure we have recieved NUMBERS and not anything else. These act as flags that will later end the program.
60-
uppers = scan(argument, cap) ! This will look for uppercase letters in the recieved string. If any letter is uppercase, uppers will be updated.
61-
lowers = scan(argument, low) ! This will look for lowercase letters in the recieved string. If any letter is lowercase, lowers will be updated.
62-
63-
! Will see if there are any uppercase, if so, print an error.
64-
if (uppers > 0) then
65-
write(*,'(g0.8)')"Usage: please input the count of fibonacci numbers to output"
66-
STOP
67-
endif
68-
69-
! Will see if there are any lowercase, if so, print an error.
70-
if (lowers > 0) then
71-
write(*,'(g0.8)')"Usage: please input the count of fibonacci numbers to output"
72-
STOP
73-
endif
74-
75-
76-
! If all checks pass, we will enter this section. If non pass, we will not reach this point
77-
! Enter a loop
78-
read (argument, '(I10)') loop
79-
do i = 1, loop
80-
write(*,'(5g0)') i, ": ", currentnumber ! Print current iteration, and current number
81-
addednumber = previousnumber + currentnumber ! Replace the value of 'added number' with both 'current number' and 'previous number'
82-
previousnumber = currentnumber ! Replace the value of 'previous number' with 'current number'
83-
currentnumber = addednumber ! Replace the value of 'current number' with 'added number'
84-
end do
34+
implicit none
35+
integer(kind=8) :: prev, curr, next, n, i
36+
character(len=32) :: arg
37+
integer :: ios
38+
39+
if (command_argument_count() /= 1) then
40+
call usage()
41+
return
42+
endif
43+
44+
call get_command_argument(1, arg)
45+
arg = adjustl(trim(arg))
46+
if (len_trim(arg) == 0) then
47+
call usage()
48+
return
49+
endif
50+
51+
read(arg, *, iostat=ios) n
52+
if (ios /= 0 .or. n < 0) then
53+
call usage()
54+
return
55+
endif
56+
57+
if (n == 0) return
58+
59+
prev = 0
60+
curr = 1
61+
62+
do i = 1, n
63+
write(*,'(I0,": ",I0)') i, curr
64+
next = prev + curr
65+
prev = curr
66+
curr = next
67+
end do
68+
69+
contains
70+
71+
subroutine usage()
72+
write(*,'(A)') "Usage: please input the count of fibonacci numbers to output"
73+
end subroutine usage
8574
8675
end program fibonacci
76+
8777
```
8878

8979
{% endraw %}
9080

9181
Fibonacci in [Fortran](https://sampleprograms.io/languages/fortran) was written by:
9282

9383
- Butenkite
84+
- Ștefan-Iulian Alecu
9485

9586
If you see anything you'd like to change or update, [please consider contributing](https://github.com/TheRenegadeCoder/sample-programs).
9687

docs/projects/fibonacci/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: 2018-10-02
33
featured-image: fibonacci-in-every-language.jpg
4-
last-modified: 2025-10-08
4+
last-modified: 2025-10-15
55
layout: default
66
tags:
77
- fibonacci

docs/projects/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
date: 2018-03-15
33
featured-image: programming-projects-in-every-language.jpg
4-
last-modified: 2025-10-14
4+
last-modified: 2025-10-15
55
layout: default
66
title: Programming Projects in Every Language
77
---

0 commit comments

Comments
 (0)