1. What is the output if the username is "administrator" and the password is 1 "admin123" ? * Dim strusername As String = Left (txtUsername.Text, 5) Dim strPassword As String = txtPassword. Text If strUsername = "admin" Then If strPassword = "admin123" Then MsgBox ("Welcome") Else MsgBox ("Invalid password") End If Else MsgBox ("Invalid username") End If A. Welcome O B. Syntax error O C. Invalid password O D. Invalid username

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question

objective question

1. What is the output if the username is "administrator" and the password is 1
"admin123" ? *
Dim strUsername As String = Left (txtUsername. Text, 5)
Dim strPassword As String = txtPassword. Text
If strUsername = "admin" Then
If strPassword
"admin123" Then
%3D
MsgBox ("Welcome")
Else
MsgBox ("Invalid password")
End If
Else
MsgBox ("Invalid username")
End If
A. Welcome
B. Syntax error
C. Invalid password
O D. Invalid username
Transcribed Image Text:1. What is the output if the username is "administrator" and the password is 1 "admin123" ? * Dim strUsername As String = Left (txtUsername. Text, 5) Dim strPassword As String = txtPassword. Text If strUsername = "admin" Then If strPassword "admin123" Then %3D MsgBox ("Welcome") Else MsgBox ("Invalid password") End If Else MsgBox ("Invalid username") End If A. Welcome B. Syntax error C. Invalid password O D. Invalid username
3. What is the value in the IbITotal when the codes given is executed?
1 point
Private Sub btnTotal_Click (sender As Object,
EventArgs) Handles btnTotal.click
Dim A As Integer
Dim B As String
For A %3D 0 То 9
If A Mod 3 Then
B = B & A
%3D
End If
Next
lblTotal. Text = B
End Sub
O A. 02468
B. 13579
O C. 124578
O D. 0123456789
Transcribed Image Text:3. What is the value in the IbITotal when the codes given is executed? 1 point Private Sub btnTotal_Click (sender As Object, EventArgs) Handles btnTotal.click Dim A As Integer Dim B As String For A %3D 0 То 9 If A Mod 3 Then B = B & A %3D End If Next lblTotal. Text = B End Sub O A. 02468 B. 13579 O C. 124578 O D. 0123456789
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Project Roles
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage