Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
53
Task/The-Name-Game/XBasic/the-name-game.basic
Normal file
53
Task/The-Name-Game/XBasic/the-name-game.basic
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
PROGRAM "The Name Game"
|
||||
VERSION "0.0000"
|
||||
|
||||
DECLARE FUNCTION Entry ()
|
||||
DECLARE FUNCTION TheGameName (nombre$)
|
||||
|
||||
FUNCTION Entry ()
|
||||
DIM listanombres$[5]
|
||||
listanombres$[0] = "Gary"
|
||||
listanombres$[1] = "EARL"
|
||||
listanombres$[2] = "billy"
|
||||
listanombres$[3] = "FeLiX"
|
||||
listanombres$[4] = "Mary"
|
||||
listanombres$[5] = "ShirlEY"
|
||||
|
||||
FOR i = 0 TO 5
|
||||
TheGameName(listanombres$[i])
|
||||
NEXT i
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION TheGameName (nombre$)
|
||||
x$ = LCASE$(nombre$)
|
||||
x$ = UCASE$(MID$(x$, 1, 1)) + MID$(x$, 2, LEN(x$) - 1)
|
||||
x0$ = UCASE$(MID$(x$, 1, 1))
|
||||
|
||||
IF (x0$ = "A") OR (x0$ = "E") OR (x0$ = "I") OR (x0$ = "O") OR (x0$ = "U") THEN
|
||||
y$ = LCASE$(x$)
|
||||
ELSE
|
||||
y$ = MID$(x$, 2, LEN(x$) - 1)
|
||||
END IF
|
||||
|
||||
b$ = "b" + y$
|
||||
f$ = "f" + y$
|
||||
m$ = "m" + y$
|
||||
|
||||
IF x0$ = "B" THEN
|
||||
b$ = y$
|
||||
ELSE
|
||||
IF x0$ = "F" THEN
|
||||
f$ = y$
|
||||
ELSE
|
||||
IF x0$ = "M" THEN
|
||||
m$ = y$
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
|
||||
PRINT x$ + ", " + x$ + ", bo-" + b$
|
||||
PRINT "Banana-fana fo-" + f$
|
||||
PRINT "Fee-fi-mo-" + m$
|
||||
PRINT x$ + "!" + CHR$(10)
|
||||
END FUNCTION
|
||||
END PROGRAM
|
||||
Loading…
Add table
Add a link
Reference in a new issue