Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Pre-University Math Help > Other topics
Reply
 
Thread Tools Display Modes
  #1  
Old November 7th, 2009, 02:48 AM
Newbie
 
Join Date: May 2007
Posts: 21
Country:
Thanks: 3
Thanked 0 Times in 0 Posts
turboman is on a distinguished road
Default A problem in Algorithms

Dear ALL,

Please help me to solve the problem in Algorithms.

Consider the following sequence of steps:

1. count:=0
2. answer:=5
3. while count <=9 do
3.1 count:=count+2
3.2 answer:=answer+count
4. output

b. Construct a trace table to show the value of all variables.
c. What is the value of answer after 3 iterations of the for-do loop?
d. Is the sequence of steps an algorithm? Give a reason for the answer.

Could you tell me how to do it??

Cheers,
Reply With Quote
Advertisement
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 09:04 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.