
Advanced Engineering Mathematics
10th Edition
ISBN: 9780470458365
Author: Erwin Kreyszig
Publisher: Wiley, John & Sons, Incorporated
expand_more
expand_more
format_list_bulleted
Question
![2 Summations
These three program snippets beep (by calling the beep() method). Looking at the code
in each case you will see that the number of beeps depends only on the variable n.
For each of the four a) write down a closed formula for the number of beeps using n
(such as "3n +4" which is not one of the solutions) and b) write down how much that is
for n = 1000. [3/each = 9]
for (int i = 1; i <= 5; i++)
for (int j = 1; j <= n; j++)
beep();
for (int i = 1; i <= n; i++)
for (int j = 1; j <i; j++){
beep();
beep();
beep();
for (int i = 1; i<n; i++)
for (int j = 1; j<n; j+=n) {
beep0:
beep0:
beep();
number of beeps depending on n
number of beeps for n = 1000.
number of beeps depending on n
number of beeps for n = 1000
number of beeps depending on n
number of beeps for n = 1000](https://content.bartleby.com/qna-images/question/957a6242-1a60-46cb-823f-4a25075634cc/c12622fb-8e93-4b20-9edc-a4eeb23c75b0/92oun7_thumbnail.jpeg)
Transcribed Image Text:2 Summations
These three program snippets beep (by calling the beep() method). Looking at the code
in each case you will see that the number of beeps depends only on the variable n.
For each of the four a) write down a closed formula for the number of beeps using n
(such as "3n +4" which is not one of the solutions) and b) write down how much that is
for n = 1000. [3/each = 9]
for (int i = 1; i <= 5; i++)
for (int j = 1; j <= n; j++)
beep();
for (int i = 1; i <= n; i++)
for (int j = 1; j <i; j++){
beep();
beep();
beep();
for (int i = 1; i<n; i++)
for (int j = 1; j<n; j+=n) {
beep0:
beep0:
beep();
number of beeps depending on n
number of beeps for n = 1000.
number of beeps depending on n
number of beeps for n = 1000
number of beeps depending on n
number of beeps for n = 1000
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
Similar questions
- When working with very large or very small numbers we don't always want to write out all of the zeros. One strategy for shortening these numbers is to write these them in terms of powers of ten. To do this, we consider how many times we need to multiple ten by itself to get the desired output. Example: • 10 = 10¹ • 100 = 10 x 10 = 10² • 1000 Try it = Answer: 10 × 10 × 10 = 10³ Write ten thousand as a power of ten. Calculatorarrow_forwardIn step 4 why did multiply $129000(.6) instead of (.1) like it has in the given.arrow_forwardQUESTION 2 Jim wants to buy a computer. The total cost is $1,180. If he can save $60 a month, how long will it take for him to save up for the computer? For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). BIUS Paragraph Arial 14px !!arrow_forward
- Drag the correct integers to the numbered boxes below to write equivalent expressions.arrow_forwardEli currently has 45 tulips in his yard. Each year he plants 9 more. (a) Which of the following is a recursive formula for the number of tulips Eli has? P₁ = 45 Pt= Pt + 45 Pt +9 Pt-1+9 Pt-1 + 45 (b) Write an explicit formula for the number of tulips Eli has. P₁ =arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Advanced Engineering MathematicsAdvanced MathISBN:9780470458365Author:Erwin KreyszigPublisher:Wiley, John & Sons, IncorporatedNumerical Methods for EngineersAdvanced MathISBN:9780073397924Author:Steven C. Chapra Dr., Raymond P. CanalePublisher:McGraw-Hill EducationIntroductory Mathematics for Engineering Applicat...Advanced MathISBN:9781118141809Author:Nathan KlingbeilPublisher:WILEY
- Mathematics For Machine TechnologyAdvanced MathISBN:9781337798310Author:Peterson, John.Publisher:Cengage Learning,

Advanced Engineering Mathematics
Advanced Math
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Wiley, John & Sons, Incorporated

Numerical Methods for Engineers
Advanced Math
ISBN:9780073397924
Author:Steven C. Chapra Dr., Raymond P. Canale
Publisher:McGraw-Hill Education

Introductory Mathematics for Engineering Applicat...
Advanced Math
ISBN:9781118141809
Author:Nathan Klingbeil
Publisher:WILEY

Mathematics For Machine Technology
Advanced Math
ISBN:9781337798310
Author:Peterson, John.
Publisher:Cengage Learning,

