SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 1 Day Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 05 Jan 2018 My Price 8.00

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)

       A.) num < 1 || num > 5
       B.) num < 1 && num > 5
       C.) num >= 1 && num <= 5
       D.) num >= 1 || num <= 5 

Answers

(5)
Status NEW Posted 05 Jan 2018 02:01 PM My Price 8.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)