Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

A-level Computing 2009/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Skeleton code/Programming

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Sub Main() Dim Names(4) As String Dim Current As Integer Dim Max As Integer Dim Found As Boolean Dim PlayerName As String Names(1) = "Ben" Names(2) = "Thor" Names(3) = "Zoe" Names(4) = "Kate" Max = 4 Current = 1 Found = False Console.WriteLine("What player are you looking for?") PlayerName = Console.ReadLine While Found = False And Current <= Max If Names(Current) = PlayerName Then Found = True Else Current = Current + 1 End If End While If Found = True Then Console.WriteLine("Yes, they have a top score") Else Console.WriteLine("No, they do not have a top score") End If Console.ReadLine() End Sub