All aR wers. Stmplly Show (1S points) Always give the best possible answer. cred
ID: 3698496 • Letter: A
Question
All aR wers. Stmplly Show (1S points) Always give the best possible answer. credit. all work for logic below will sum all the stored in a single column of data from the worksheet. The 82" worksheet cel: this number represents how many numbers ts I. 7pes) Complete the macro containing the For-loop. The start in cell C2" and continue down the workshoet page. An excem The of the worksheet is shown below, but numbers are concecaled with x's. You must write the code what numbers are in the worksheet. Sub quiz30 Anchor As String "B2 Const testi As intetera1 As Double, nitems As Integer Const test1 As Integer 7 Dim ix As Integer, total nitems e total ntens Range(Anchor).Cells(1,1).Value For ?? . total tetal + Range( Anch Nextiix MsgBoxt "The column total is: "& total ) Value End Sub 2 2. (3 pts) Compute the trip count for the following For-Loop: Const Sentinel As Integer 343 Const Inc As Integer 7 Dim idx As Integer, total As Double total # ) For idx 1 To Sentinel Step Inc total - total+ Sqr( idx Inc Next idx Trip count (continued on the back)Explanation / Answer
Answers are as follows:
a) The answer provided by you in the part a is correct but there will some wrong variables used. The for loop with correctness is as follows :
for ix = 1 to nItems Step 1
total = total + Range(Anchor).Cells (iR,iX) . Value
Next ix
The bold letters are filled blanks..
b) The value of trip count of for loop is wrong.
It will runs from 1 to 343 but with the increment of 7 i.e. inc.
So if we divide 343 by 7 than we get 49.
So correct value of trip count is 49.
if there is any query please ask in comments....
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.