Skip to main content
Commonmark migration
Source Link

#TI-BASIC

TI-BASIC

No computer handy? This works on all TI-83/84/+/SE calculators.

PROGRAM:RANDOM
:"NEW ARRAY NAME:"
:"JOHN"
:"JEFF"
:"EMMA"
:"STEVE"
:"JULIE"
:Disp "NAMES[floor(rand*5)]"
:Disp "NAME: ",Ans

The names are successively set into Ans (so JULIE would be the contents of Ans). Then, the NAMES[floor(rand*5)] is piped away as a useless string, and the last line looks line it is pulling one of the names from the array NAME (which doesn't exist, by the way). Instead, it will always display JULIE. The order of the names can be switched around to provide a different victim on demand.

#TI-BASIC

No computer handy? This works on all TI-83/84/+/SE calculators.

PROGRAM:RANDOM
:"NEW ARRAY NAME:"
:"JOHN"
:"JEFF"
:"EMMA"
:"STEVE"
:"JULIE"
:Disp "NAMES[floor(rand*5)]"
:Disp "NAME: ",Ans

The names are successively set into Ans (so JULIE would be the contents of Ans). Then, the NAMES[floor(rand*5)] is piped away as a useless string, and the last line looks line it is pulling one of the names from the array NAME (which doesn't exist, by the way). Instead, it will always display JULIE. The order of the names can be switched around to provide a different victim on demand.

TI-BASIC

No computer handy? This works on all TI-83/84/+/SE calculators.

PROGRAM:RANDOM
:"NEW ARRAY NAME:"
:"JOHN"
:"JEFF"
:"EMMA"
:"STEVE"
:"JULIE"
:Disp "NAMES[floor(rand*5)]"
:Disp "NAME: ",Ans

The names are successively set into Ans (so JULIE would be the contents of Ans). Then, the NAMES[floor(rand*5)] is piped away as a useless string, and the last line looks line it is pulling one of the names from the array NAME (which doesn't exist, by the way). Instead, it will always display JULIE. The order of the names can be switched around to provide a different victim on demand.

added 5 characters in body
Source Link
Timtech
  • 12.6k
  • 2
  • 45
  • 61

#TI-BASIC

No computer handy? This works on all TI-83/84/+/SE calculators.

PROGRAM:RANDOM
:"NEW ARRAY NAME:"
:"JOHN"
:"JEFF"
:"EMMA"
:"STEVE"
:"JULIE"
:Disp "NAMES[floor(rand*5)]"→N]"
:Disp "NAME""NAME: ",Ans

The names are successively set into Ans (so JULIE would be the contents of Ans). Then, the NAMES[floor(rand*5)] is piped away as a useless string, and the last line looks line it is pulling one of the names from the array NAME (which doesn't exist, by the way). Instead, it will always display JULIE. The order of the names can be switched around to provide a different victim on demand.

#TI-BASIC

No computer handy? This works on all TI-83/84/+/SE calculators.

PROGRAM:RANDOM
:"NEW ARRAY NAME:"
:"JOHN"
:"JEFF"
:"EMMA"
:"STEVE"
:"JULIE"
:"NAMES[floor(rand*5)]"→N
:Disp "NAME",Ans

The names are successively set into Ans (so JULIE would be the contents of Ans). Then, the NAMES[floor(rand*5)] is piped away as a useless string, and the last line looks line it is pulling one of the names from the array NAME (which doesn't exist, by the way). Instead, it will always display JULIE. The order of the names can be switched around to provide a different victim on demand.

#TI-BASIC

No computer handy? This works on all TI-83/84/+/SE calculators.

PROGRAM:RANDOM
:"NEW ARRAY NAME:"
:"JOHN"
:"JEFF"
:"EMMA"
:"STEVE"
:"JULIE"
:Disp "NAMES[floor(rand*5)]"
:Disp "NAME: ",Ans

The names are successively set into Ans (so JULIE would be the contents of Ans). Then, the NAMES[floor(rand*5)] is piped away as a useless string, and the last line looks line it is pulling one of the names from the array NAME (which doesn't exist, by the way). Instead, it will always display JULIE. The order of the names can be switched around to provide a different victim on demand.

Source Link
Timtech
  • 12.6k
  • 2
  • 45
  • 61

#TI-BASIC

No computer handy? This works on all TI-83/84/+/SE calculators.

PROGRAM:RANDOM
:"NEW ARRAY NAME:"
:"JOHN"
:"JEFF"
:"EMMA"
:"STEVE"
:"JULIE"
:"NAMES[floor(rand*5)]"→N
:Disp "NAME",Ans

The names are successively set into Ans (so JULIE would be the contents of Ans). Then, the NAMES[floor(rand*5)] is piped away as a useless string, and the last line looks line it is pulling one of the names from the array NAME (which doesn't exist, by the way). Instead, it will always display JULIE. The order of the names can be switched around to provide a different victim on demand.