Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
31
Task/The-Name-Game/FreeBASIC/the-name-game.basic
Normal file
31
Task/The-Name-Game/FreeBASIC/the-name-game.basic
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
Sub TheGameName(nombre As String)
|
||||
Dim As String x = Lcase(nombre)
|
||||
x = Ucase(Mid(x,1,1)) + (Mid(x,2,Len(x)-1))
|
||||
Dim As String x0 = Ucase(Mid(x,1,1))
|
||||
|
||||
Dim As String y
|
||||
If x0 = "A" Or x0 = "E" Or x0 = "I" Or x0 = "O" Or x0 = "U" Then
|
||||
y = Lcase(x)
|
||||
Else
|
||||
y = Mid(x,2)
|
||||
End If
|
||||
|
||||
Dim As String b = "b" + y, f = "f" + y, m = "m" + y
|
||||
|
||||
Select Case x0
|
||||
Case "B" : b = y
|
||||
Case "F" : f = y
|
||||
Case "M" : m = y
|
||||
End Select
|
||||
|
||||
Print x + ", " + x + ", bo-" + b
|
||||
Print "Banana-fana fo-" + f
|
||||
Print "Fee-fi-mo-" + m
|
||||
Print x + "!" + Chr(10)
|
||||
End Sub
|
||||
|
||||
Dim listanombres(5) As String = {"Gary", "EARL", "billy", "FeLiX", "Mary", "ShirlEY"}
|
||||
For i As Integer = 0 To Ubound(listanombres)
|
||||
TheGameName(listanombres(i))
|
||||
Next i
|
||||
Sleep
|
||||
Loading…
Add table
Add a link
Reference in a new issue