SHARE
TWEET

Untitled

a guest May 19th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         Dim IncrementingNumberToBESquared As Double = 0
  2.         Dim UserInput As Double = 0
  3.         Dim IntermediateCalculationMultiplication As Double = 0
  4.         Console.WriteLine("Input the number to be tested")
  5.         UserInput = Console.ReadLine()
  6.         While IncrementingNumberToBESquared <> UserInput
  7.             IntermediateCalculationMultiplication = IncrementingNumberToBESquared * IncrementingNumberToBESquared
  8.             If IntermediateCalculationMultiplication > UserInput Then
  9.                 UserInput = IncrementingNumberToBESquared
  10.                 Console.WriteLine("Not a square Number")
  11.             ElseIf IntermediateCalculationMultiplication < UserInput Then
  12.                 IncrementingNumberToBESquared = IncrementingNumberToBESquared + 1
  13.             ElseIf IntermediateCalculationMultiplication = UserInput Then
  14.                 UserInput = IncrementingNumberToBESquared
  15.                 Console.WriteLine("A squareNumber")
  16.             End If
  17.         End While
  18.         Console.ReadKey()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top