Determine the name of the loop control variable

Assignment Help C/C++ Programming
Reference no: EM131743053

QUESTION 1
Given the code below, determine the name of the loop control variable
BEGIN
Declare Integer x = 1
While ( x <= 5 ) Do
Input "Enter a number: ", x
Set x = x + 2
End While
END
Ans:_________

QUESTION 2
Determine the initial value for the loop control variable given the code below.
BEGIN
Declare Integer x = 1
Set x = 13
While ( x <= 5 )
Input "Enter a number: ", x
Set x = x+ 2
End While
END
Ans:___________

QUESTION 3
Determine the value by which the loop control variable is updated given the code below.
BEGIN
Declare Integer x = 13
While ( x <= 5 )
Input "Enter a number: ", x
Set x = x - 2
End While
END
Ans: ___________

QUESTION 4
Given the code below, determine the number of iterations the were performed by the looping structure.
BEGIN
Declare Integer x = 1
While ( x <= 5 )
Set x = x+ 2
End While
Display x
END

A.1
B.2
C.3
D.4


QUESTION 5
Given the code below, determine the number of iterations the were performed by the looping structure.
BEGIN
Declare Integer x = 13
While ( x <= 5 )
Set x = x+ 2
End While
Display x
END

A.None
B.1
C.2
D.3


QUESTION 6
Given the code below, determine the number of iterations the were performed by the looping structure.
BEGIN
Declare Integer x = 5
While ( x <= 5 )
Display "Hello World! "
End While
Display x
END

A.None
B.1
C.3
D.Infinite number of times [Endless Loop]


QUESTION 7
Given the code below, determine the output being generated after executing it.
BEGIN
Declare Integer x = 1
While ( x <= 5 )
Display x
Set x = x + 2
End While
END

A.1, 2, 3, 4, 5
B.1, 3, 5
C.1, 3, 5, 7
D.1, 2, 3, 4, 5, 6


QUESTION 8
Given the code below, determine the output being generated as a result of executing it.
BEGIN
Declare Integer x = 11
While ( x > 5 )
Display x
Set x = x - 5
End While
END

A.11, 6
B.11, 10, 9, 8, 7, 6, 5
C.11, 10, 9, 8, 7, 6
D.6, 10

 

Reference no: EM131743053

Questions Cloud

Discuss an emerging marketing trend that may affect business : Compare and contrast how culture is likely to impact domestic marketing strategies versus what the company may encounter .
Analyze what is the purpose of a code of conduct : Answer the following questions: Analyze what is the purpose of a code of conduct? Why is it important for a company to have a written code of conduct?
Find probability that national percentage is true in area : Who's the boss? The 2000 Census revealed that 26% of all firms in the United States are owned by women. You call some firms doing business locally.
Identify the relevant elements to include in code of conduct : Identify the relevant elements to include in the code of conduct? Apply concepts from the course readings to support your recommendation.
Determine the name of the loop control variable : Determine the name of the loop control variable - Determine the initial value for the loop control variable and Determine the value by which the loop control
Analyze a multifamily investment property : Go to How to Use the 50% Rule to Analyze a MultiFamily Investment Property and watch the video.
Probability that all kids would get the same-color shirt : Why was he so surprised? If each age group uses the same 4 colors, what is the probability that all four kids would get the same-color shirt?
Selecting a carton with a smashed? corner : Are the events? "selecting a carton with a? puncture" and? "selecting a carton with a smashed? corner" mutually? exclusive? Explain.
Contrast the poetry of adrienne rich with emily dickinson : Compare or contrast the poetry of Adrienne Rich with Emily Dickinson

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Program that prints the statement

Write a program that prints the statement "Learning new topics is Fun!" in a function called writeThoughts that is called by the main function.

  Develop a data representation for the current position

Develop a data representation for the current position of the ball. The position is best described with a pair of positive integers. Develop a data representation for velocity of the ball. You may assume that the ball always moves exactly 10 pixe..

  Write short c program to develops two processes

Write down a short C program which develops two processes. Each process must repeatedly write its own unique message to test file, one character at time. Do you see garbled messages in the file? Explain why or why not?

  Write the definition of the function template

Add the operation queueCount to the class queueType (the array implementation of queues), which returns the number of elements in the queue

  Program to handle various string operations.

Write a main program that calls the function with the pointer to the string and the number of characters from the end (not including the end of string character)

  Prepare your own unique while-end repetition structure

Create your own unique While-End repetition structure. You decide the theme. You should provide both the pseudocode and the flowchart of your example.

  Throws an exception from a deeply nested

Write a program that throws an exception from a deeply nested function and still has the catch handler following the try block enclosing the initial call in main catch the exception

  Prepare a program that uses at least two functions that can

prepare a program that uses at least two functions that can be called from your main. this program is a number game

  Estimated number of copies that will be sold

Write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold.

  The function should accept the future value

The function should accept the future value, annual interest rate, and number of years as arguments. It should return the present value, which is the amount that you need to deposit today. Demonstrate the function in a program that lets the user expe..

  Function odd_fill() that fills all integers between two poin

write a function odd_fill() that fills all integers between two pointers, first and last, with a sequence of odd integers: 1,3,5,7

  Use functional decomposition to solve

Use functional decomposition to solve this problem, and code the solution using functions wherever it makes sense to do so. Your program should check for invalid data such as nonpositive dimensions, number of rooms less than 1.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd