Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Questions: 1. (5 marks) Create a VB.NET Console Application that defines a function Smallest and calls this function from the main program. The function Smallest

Questions: 1. (5 marks) Create a VB.NET Console Application that defines a function Smallest and calls this function from the main program. The function Smallest takes three parameters, all of the Integer data type, and returns the value of the smallest among the three parameters. The main program should (1) Prompt a message (using Console.WriteLine) to ask the user to input three integers. (2) Call the built-in function Console.ReadLine() three times to get the users input. (3) Convert the users input from strings to integers. (4) Call the function Smallest, with the users input as its parameters. (5) Display the result of the function Smallest in the Console window using Console.WriteLine. You may assume that the user always correctly inputs integers from the keyboard, and your program does not have to check whether the user inputs something other than integers. Print your program and handwrite the users input and output at the end of the printout of your program. 2. (5 marks) Create a VB.NET Console Application that does the following: (1) Create an Integer array which contains 10 elements. (2) Assign the following values to the elements in the array: 9, 1, 8, 4, 2, 6, 7, 3, 5, 10 (3) Use the For-Each-loop to compute and printout the sum of all elements of the array in the Console window.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

More Books

Students also viewed these Databases questions

Question

=+ Introduce unionization rates and rationales pro and con.

Answered: 1 week ago