Wednesday
October 1, 2014

Homework Help: Discrete Mathematics

Posted by Compstudent on Wednesday, March 30, 2011 at 10:10pm.

How many elementary operations are used in the following algorithm?

Step 1 Set S = a, k = 0 , and t = a
Step 2 while k < n
(a) Replace t with t+d
(b) Replace S with S+t
(c) Replace k with k+1

endwhile
Step 2 Print S

------------------------
My answer was: 4*n+1
I don't know if it is right :(

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

ALGEBRA HELP - When solving the equation, what property was used to go from step...
Math - Use multiplication, division, addition and subtraction and at least one ...
pre algebra - solve the equation step by step.list each step along with the ...
algebra 1 - ELEMENTARY ALGEBRA #3 Page 23 Chapter 3 Lesson 3.02 Solving Multi-...
algerbra - solve the equation step by step list each step along with the ...
Discrete Math - Geometric Vectors - I'm lost! How do you add the following ...
Math - Use multiplication, division, addition and subtraction and at least one ...
geometry - The figure shows some of the steps Jane took to draw a line segment ...
math - For each of the following expressions, show each step a student would ...
arithmetic math - For each of the following expressions, show each step a ...

Search
Members