Question

1) SET t = 23 set a = 18 set b = 5 WHILE a>b INCREMENT...

1) SET t = 23
set a = 18
set b = 5
WHILE a>b
INCREMENT t
INCREMENT b
DECREMENT a
ENDWHILE
PRINT a and t

select one: don't need to explain
a) 13 and 26
b) 11 and 30
c) 12 and 31
d) 12 and 28

2) set t = 0
set a = 0
set b = 5
WHILE a <b
INCREMENT t
INCREMENT a
ENDWHILE
PRINT a and t

select one: dont explain
a) 3 and 5
b) 5 and 5
c) 4 and 2
d) 4 and 4

Homework Answers

Answer #1

Answer for first would be - b) 11 and 30

Explaination for question# 1 - Here intial values are t = 23, a = 18, b = 5. While condition is (a>b).

Here for given values while condition would be false when b becomes 12 that time a would be 11.

Here while loop would execute 7 times and in while loop we are doing  INCREMENT t, INCREMENT b, and DECREMENT a and printing a and t.

So result would be a=18-7 = 11 and t=23+7=30

**********************************************************************************

Answer for second would be - b) 5 and 5

Explanation for question #2 - Here intial values are t = 0, a = 0 and b = 5. While condition is (a<b).

Here for given values while condition would be false when a becomes 6. And while loop stop executing.

Here while loop will exceute 5 times. and we are incremeting t and a.

So result would be a= 0+5 = 5 and t=0+5=5

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Can someone please explain this 1. Determine the output a = 3 b = 4 c...
Can someone please explain this 1. Determine the output a = 3 b = 4 c = 10 While a < c       a = a + 2       b = b * 2 Endwhile Output a, b, c 2. Determine the output k = 4 m = 0 n = 7 While j < k m = 5 While m < n Ouput “X” m = m + 1 Endwhile j = j + 1 Endwhile Output j, k,...
Choose either column D or E of the attached data set and analyze using the techniques...
Choose either column D or E of the attached data set and analyze using the techniques discussed in class up to this point. This includes the following: Find the appropriate measure of center. Discuss why the chosen measure is most appropriate. Why did you decide against other possible measures of center? Find the appropriate measure of variation. The measure of variation chosen here should match the measure of center chosen in Part 1. Find the graph(s) needed to appropriately describe...
Problem #3 1) Conduct a related-sample t-test using the following data set. Each row represents a...
Problem #3 1) Conduct a related-sample t-test using the following data set. Each row represents a pair of scores. A: 18, 35, 31, 30, 40, 25, 11, 30, 28, 20 B: 4, 40, 13, 18, 30, 27, 17, 18, 12, 20 - 2) Determine the critical values (for an alpha of .05) that you should use to evaluate this t-score. - 3) Compute r2 for this t-test.
#mod reset; param T > 0, integer; set IND := 1..T; set END := 0..T+1; param...
#mod reset; param T > 0, integer; set IND := 1..T; set END := 0..T+1; param a >= 0; param b >= a; param c <= a; param r >= 0; param s >= 0; param d {IND} >= 0; var X {IND} >= 0, <= r; var Y {IND} >= 0, <= s; var Z {END} >= 0; minimize COST: sum {i in IND} (a * X[i] + b * Y[i] + c * Z[i]); subject to BAL {i...
Answer part a and b of question. (I will give a negative rating if you solved...
Answer part a and b of question. (I will give a negative rating if you solved just one part) a) Find the 85th Percentile of the data set. b) For a population represented by the sample data sets, suppose a vehicle is travelling at 40mph while the driver shifts his focus and fixates on a road object. Estimate a value for the distance traveled during the process that could be exceeded by this driver with a probability of 15%. DATA...
T: R^3 ----> R^5 such that T(x), then... a. A^-1 is 3x 5 matrix b. the...
T: R^3 ----> R^5 such that T(x), then... a. A^-1 is 3x 5 matrix b. the mapping cannot be onto c. the set of solutions to Ax=0 is infinite d. A has at least 2 free variables e. none of the above
Hudson Marine has been an authorized dealer for C&D marine radios for the past seven years....
Hudson Marine has been an authorized dealer for C&D marine radios for the past seven years. Suppose the quarterly sales values for the seven years of historical data are as follows. Year Quarter 1 Quarter 2 Quarter 3 Quarter 4 Total Yearly Sales 1 7 13 9 4 33 2 11 20 16 6 53 3 12 25 25 11 73 4 18 28 26 16 88 5 23 35 27 21 106 6 24 37 31 18 110 7...
Multiple choice 1. if a = [1, 2] b = [2, 7] find a + 2b...
Multiple choice 1. if a = [1, 2] b = [2, 7] find a + 2b A.3 √10 B. [6, 18] C. [5, 16] D. √281 2. if p = [ 5, -3] and q = [ 1, 4] find |p - 51| a. [0, 23] b. 23 c. 529 d. [4, -7] 3. if a = [ 5, -5] and b = [-5, 5] find A x B (A multiply by B) a. 50 b. 0 c. -50 d....
Dep Delay Arr Delay q1 -13 -9 q3 1 3 IQR 14 12 stdev 9.211846 9.660933...
Dep Delay Arr Delay q1 -13 -9 q3 1 3 IQR 14 12 stdev 9.211846 9.660933 negative 291 zero 39 positive 170 total (should be 500) 500 all data is for arrival data. please help me explain these can someone help me answer these questions and tell me how to put them in excel.thanx in advance 1.    Define a random variable (X) so that your chosen data set represents values of X. 2.    Is your chosen random variable discrete or...
NA = 6.022×1023 Ek = 1 2 mv2 T(F°) = T(C°) × 9 5 + 32...
NA = 6.022×1023 Ek = 1 2 mv2 T(F°) = T(C°) × 9 5 + 32 MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) Combustion analysis of an unknown compound containing only carbon and hydrogen produced 17.02 g of CO 2 and 8.721 g of H2O. What is the empirical formula of the compound? A) C2H5 B) CH2 C) CH D) C3H8 1) 2) How many moles of CuO can be produced...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT