What will be displayed when the sub procedure that follows is run, true or false? Show all the steps.
Option Explicit
Sub test()
Dim x As Double, z As Double, a As String, b As String
x = 7
z = 6
a = "b"
b = "a"
If Not z > 4 * Atn(1) Or rrr(x) < z Or x > 7 And a > b
Then
MsgBox "true"
Else
MsgBox "false"
End If
End Sub
Function rrr(x)
rrr = -x
End Function
We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
What will be displayed when the sub procedure that follows is run, true or false? Show...
When Sub Main below is executed, what will be displayed by the two message box? Sub Main() Dim X As Short = 10 Dim Y As Short = 20 Call SomeWeirdMath(X,Y) MsgBox (X) MsgBox (Y) End Sub Sub SomeWeirdMath(ByRef P As Short, ByVal Q As Short) P = P*Q Q = Q*P End Sub
Show the contents of the label, lblOut, after the following Procedure is called: Sub PrintStuff() Dim intVal As Integer = 0 Dim strOut As String = String.Empty Do While intVal < 13 If intVal = 8 Then strOut = strOut & "k." ElseIf intVal = 9 Then strOut = strOut & " St" ElseIf intVal = 6 Then strOut = strOut & "Br" ElseIf intVal = 1 Then strOut = strOut & " gr" ElseIf intVal = 10...
I need to write a loop that examines the names of the cities stored in the array. Write code that tests for a match Write code that, when appropriate, prints the message: Not a city in Illinois _______________________________________________________________ ' IllinoisCities.vb - This program prints a message for invalid cities in Illinois. ' Input: Interactive ' Output: Error message or nothing Option Explicit On Option Strict On Module IllinoisCities Sub Main() ' Declare variables. Dim city As String ...
Project 2 – Memory Match Game Purpose This Windows Classic Desktop application plays a simple matching game. The game simulates a card game where the cards a placed face down and the player flips over pairs of cards in an attempt to find matching cards. Program Procedure Display a 4x4 grid of “face down” cards. Assign the letters A through H randomly to the cards in pairs. Allow the user to click on a card to “flip” it over and...
computer Programming
visual Basic
1-10
QUESTION 1 Which of the following is not a logical operator in Visual Basic? Not • or And Then QUESTION 2 Which of the following is a valid Visual Basic conditional statement? 2<n<5 2 <n or <5 0 2 <n<5 (2 <n) or (n <5) QUESTION 3 When Visual Basic stops evaluating a compound condition with the logical And operator because the first condition evaluates to False. It is called evaluation. short-circuit Pre- compound first...
Zander Inc. stores employee IDs and salaries in a sequential
access file named Employees.txt. Open the VB2015\Chap10\Zander
Solution\Zander Solution (Zander Solution.sln) file. Open the
Employees.txt file, which is contained in the project’s bin\Debug
folder. The ID and salary information appear on separate lines in
the file. Close the Employees.txt window. a. Define a structure
named Employee. The structure should contain two member
variables:
a String variable to store the ID and a Double variable to store
the salary.
b. Declare...
In this exercise, you’ll add code to a form that converts the
value the user enters based on the selected conversion type.
The application should handle the following conversions:
1. Open the Conversions project. Display the code for the form,
and notice the rectangular array whose rows contain the value to be
displayed in the combo box, the text for the labels that identify
the two text boxes, and the multiplier for the conversion as shown
above. Note: An array...
Question 1 When you declare a variable of type Single, it contains 0 by default. True False Question 2 The following line declares an array that can contain whole numbers, with 10 elements. Dim Variables(9) As Integer True False Question 3 Once a variable is declared we can not change the variable's data type. True False Question 4 If A is False and B is True, then A Or B is True because A is False. True False Question 5...
3. Show the stack with all activation record instances, including static and dynamic chains, when execution reaches position 1 in the following skeletal program. Assume Bigsub is at level 1 procedure Bigsub is procedure A (Flag procedure Bis Boolean) is A (false) end; -of B begin -- of A if flag then B; else C; end; -of A procedureCis procedure D is end; -of D end; -- of dC begin of Bigsub A(true); of Bigsub end; -- The calling sequence...
Microsoft Excel VBA (Visual Basic for Applications) Programming
Language
Objectives: Create an array and redim it to a size equal to an
assigned value of a variable, populate the array with a series of
random numbers, output the array to a message box and to a
worksheet.
Instructions:
- Review the variables already declared. You won't need
others.
- See comments in the code that will act as your guide. Add new
code directly after each comment.
- Assign a...