(TCO 5) Your program asks the user to enter a number between 1 and 5. Which is the correct condition for the following validation loop?

(TCO 5) Your program asks the user to enter a number between 1 and 5. Which is the correct condition for the

following validation loop?

            int num;

Console.Write(“Please enter a number between 1 and 5:”);

num = Convert.ToInt32(Console.ReadLine());

while (_____________________________)

{

Console.WriteLine(“invalid, please reenter a number between 1 and 5: “);

num = Convert.ToInt32(Console.ReadLine());

}(Points : 3)

num < 1 || num > 5
num < 1 && num > 5
num >= 1 && num <= 5
num >= 1 || num <= 5

(TCO 5) Failure to update the loop control variable within the loop body creates which of the following?(Points : 3)

A.) A counter-controlled loop.B.) An infinite loop.
C.) An event-controlled loop.
D.) None of the above

(TCO 5) What (if anything) is wrong with the following loop?

int x = 1;

while (x <10)

{

Console.WriteLine(x);

}(Points : 3)

A.)The loop body will never execute.B.)It is an infinite loop.C.)The loop control variable is not initialized.D.)Nothing.

(TCOs 5 and 8) Which of the following pseudocode loops will print the even integers from 10 to 20.(Points : 5)

A.) num = 10
while num <= 20
print num
end while
B.) num = 10
while num <= 20
end while
C.) num = 10
while num <= 20
print num
num = num + 2
end while
D.) num = 20
while num <= 20
print num
num = num + 2
end while

(TCO 5) Your program asks the user to enter a number between 1 and 5. Which is the correct condition for the following validation loop?

int num;

Console.Write(“Please enter a number between 1 and 5:”);

num = Convert.ToInt32(Console.ReadLine());

while (_____________________________)

{

Console.WriteLine(“invalid, please reenter a number between 1 and 5: “);

num = Convert.ToInt32(Console.ReadLine());

}(Points : 3)

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

What is a file? Why is it necessary to “open” and “close” a file? What happens when we do that? Explain Everything with example

What is a file? Why is it necessary to “open” and “close” a file? What happens

when we do that?  Explain Everything with example

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Suppose you have observed that your system is performing slower than usual

Suppose you have observed that your system is performing slower than usual. Applications are taking longer to

load; switching among tasks is also taking longer and may even cause some applications to crash. Which system resources are likely to be at the root of the problem? tell me how you can use system tools, such as the Task Manager, to help identify and troubleshoot these problems.

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

(TCOs 3, 7, and 8) Breaking a complex problem into more manageable pieces is called a _____ approach to problem solving. (Points : 3)

(TCOs 3, 7, and 8) Breaking a complex problem into more manageable pieces is called a _____

approach to problem solving. (Points : 3)

       separate and deliver

separate and detach

divide and conquer

divide and deliver

Question 2.

2. (TCOs 3, 7, and 8) Which of the following is not a good module name according to common convention? (Points : 3)

printPageHeadings()

calculateEmployeePay()

salesTax()

validateInputDate()

Question 3.

3. (TCOs 3, 7, and 8) In order for the code in a function to be executed, there must be a function _____. (Points : 3)

definition

declaration

call

module

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"