General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 30th, 2010, 08:02 PM
jvansant jvansant is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 1 jvansant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 5 m 45 sec
Reputation Power: 0
Simple pep/8 program.. need help!

Working on a csci project and am really lost. We are to create a program that will prompt the user for how many non-negative numbers are to be entered, and then will prompt for those non-negative numbers and display the maximum of the values entered. The program is to repeat until the user enters -1 as a response to the prompt for how many numbers. You may assume the user will cooperate with all input prompts (i.e., will, indeed, enter a positive integer, or -1, for the count of how many numbers are to be entered, and will enter only non-negative numbers to be processed for their maximum).

Here is the algorithm to the solution, but I don't really know how to translate that into assembly language (source code). Any help would be soooo huge and important, please.
Thanks for your time.

Prompt for how many numbers, or -1 to quit
Read HowMany
WHILE (HowMany <> -1)
------Set Max to 0
------WHILE ((HowMany > 0)
-------------Prompt for candidate number
-------------Read Num
-------------If (Num > Max)
------------------Set Max to Num
-------------Set HowMany to HowMany 1
-------Display Answer Message
-------Display Max
-------Prompt for how many numbers, or -1 to quit
-------Read HowMany
Display thank you message

Reply With Quote
  #2  
Old April 1st, 2010, 02:53 AM
mecanicu mecanicu is offline
anonymous
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 244 mecanicu User rank is Private First Class (20 - 50 Reputation Level)mecanicu User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 12 h 21 m 10 sec
Reputation Power: 13
simple?

This might be not as simple as you think and this depends on:
Which version of assembler do you use?
Will be this program entirely written in assembler or you can use the C/C++ or Pascal language for inputs/outputs?
Have you already write some Read/Write functions or you must do it all from scratch?
Which version of assembler / other language you use?
On what machine is supposed to work this program?

Once you supply this minimal information you might get some help here, on the problems encountered when you write your program.

all the best

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Simple pep/8 program.. need help!


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap