Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use the following selection structure to answer the next three questions. If int

ID: 3906058 • Letter: U

Question

Use the following selection structure to answer the next three questions.

If intNumber<= 100 Then intNumber = intNumber * 2

Else

If intNumber> 500 Then intNumber = intNumber * 3

End If

End If

36. Assume intNumber initially contains 50. What value intNumber will contain after the above selection structure is executed?

37. Assume intNumber initially contains 500. What value intNumber will contain after the above selection structure is executed?

38. Assume intNumber initially contains 1000. What value intNumber will contain after the above selection structure is executed?

Explanation / Answer

NOTE: I have completed the program for your assignment. Please check and let me know if you have any questions. I will acknowledge back with a response within 24 hours. Thanks for your patience.

Use the following selection structure to answer the next three questions.

If intNumber<= 100 Then intNumber = intNumber * 2

Else

If intNumber> 500 Then intNumber = intNumber * 3

End If

End If

36. Assume intNumber initially contains 50. What value intNumber will contain after the above selection structure is executed?
Explanation:
1) intNumber containing 50 will match the first IF condition.
2) So the statement inside first IF gets executed. That intNumber = 50 * 2 = 100.
3) Hence the answer is 100.

37. Assume intNumber initially contains 500. What value intNumber will contain after the above selection structure is executed?
Explanation:
1) intNumber containing 500 will not match any IF condition.
2) The reason is first IF condition checks if intNumber <= 100 which 500 is not.
3) Second IF condition checks if intNumber > 500 which is also not the case because intNumber is equal to 500 and not greater.
4) So the value of intNumber after selection statement is 500.

38. Assume intNumber initially contains 1000. What value intNumber will contain after the above selection structure is executed?
Explanation:
1) intNumber containing 1000 will match the second IF condition as the value is greater than 500.
2) So the statement inside second IF condition gets executed. That is intNumber = 1000 * 3 = 3000.
3) Hence the value of intNumber is 3000 after the selection structure completed execution.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote