Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
13
Task/McNuggets-problem/FreeBASIC/mcnuggets-problem.basic
Normal file
13
Task/McNuggets-problem/FreeBASIC/mcnuggets-problem.basic
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Dim As Integer l(100), a, b, c, n
|
||||
For a = 0 To 100/6
|
||||
For b = 0 To 100/9
|
||||
For c = 0 To 100/20
|
||||
n = a*6 + b*9 + c*20
|
||||
If n <= 100 Then l(n) = true
|
||||
Next c
|
||||
Next b
|
||||
Next a
|
||||
For n = 100 To 1 Step -1
|
||||
If l(n) = false Then Print "El mayor número que no sea McNugget es:"; n: Exit For
|
||||
Next n
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue