C1S115 Sample Quiz Week 6 – Guaranteed A+ Solution

Lab Price = $8.5
Please feel free to send us your queries at: support@iqrajavaid.com
Payment methods

Add to Cart

View Cart

Problem Statement
Question 1.1. (TCOS 5, 6) The following statement indicates that num is being used as a(n) _____.
num = num + x (Points : 3)
Not enough information given

Question 2.2. (TCO 6) The number of elements in the array is called the _____ of the array. (Points : 3)
None of the above

Question 3.3. (TCO 6) How do you refer to the second element of the array declared as the following?
Dim numbers(4) as Integer (Points : 3)

Question 4.4. (TCOs 5, 6, 8) What is the output of the following Visual Basic code?

Sub Main
Dim x, y As Integer
x = 3
While x < 6
y = 1
While y < 4
y = y + 1
End While
x = x + 2
End While
End Sub
(Points : 5)


Question 5.5. (TCOs 5, 6, 8) Write the Visual Basic code to for the following problem.
Declare an array to store five values; they could be decimal numbers.
Prompt the user to store values into the array.
Then prompt the user for a percent to decrease each value of the array.
Adjust the values and print the new values. Make sure you actually change the values in the array.
The output should look like this (note that it should work for any values that are input, these are just examples). You must use loop(s) to process the array.

Enter number: 10
Enter number: 20
Enter number: 30
Enter number: 40
Enter number: 50
Enter percent decrease: 5
After a 5 percent decrease the values are
Press any key to continue . . .

Dim arrNumbers(5) As Decimal
Dim PercentDecrease As Double
For index = 0 To 4 Step 1
Console.Write("Enter number: ")
arrNumbers(index) = Console.ReadLine()
Next index

Console.Write("Enter percent decrease: ")
PercentDecrease = Console.ReadLine()

For index = 0 To 4 Step 1
arrNumbers(index) = arrNumbers(index) - (PercentDecrease / 100 * arrNumbers(index))
Next index

Console.WriteLine("After a 5 percent decrease the values are")
For index = 0 To 4 Step 1
Next index

Console.WriteLine("Press any key to continue . . .")

Relevant Material
* If you want to purchase multiple products then click on “Buy Now” button which will give you ADD TO CART option.Please note that the payment is done through PayPal.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at support@iqrajavaid.com.
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at support@iqrajavaid.com and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at support@iqrajavaid.com.
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Payment Details
Lab Price = $8.5
Please feel free to send us your queries at: support@iqrajavaid.com
Payment methods

Add to Cart

View Cart