Welcome to Dream.In.Code
Getting Help is Easy!

Join 117,543 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,779 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



need help in my QBASIC homework

 
Reply to this topicStart new topic

need help in my QBASIC homework

lookin4help
post 24 May, 2008 - 05:31 PM
Post #1


New D.I.C Head

*
Joined: 24 May, 2008
Posts: 1

[i]can some1 plz tell me how to ask a user how many numbers they wish to enter. after the user enters the quantity, ask the user to enter the numbers. then find and print the sum, average, and the largest and smallest number. thank you biggrin.gif
User is offlineProfile CardPM

Go to the top of the page


no2pencil
post 24 May, 2008 - 06:41 PM
Post #2


Wet D.I.C.

Group Icon
Joined: 10 May, 2007
Posts: 5,421



Thanked 35 times

Dream Kudos: 2350

Expert In: Goofing Off

My Contributions


Asking for assistance is one thing. You just basically asked for someone to do the entire project for you.

The code to perform your project is extremely basic, & should be completed with little effort.

Prompt the user
Read the given result into a variable
Loop until that variable
Create a variable to hold the total of all results
For each loop, append the value to the variable with the total
Sort the results to find the highest & lowest

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

code.gif
User is offlineProfile CardPM

Go to the top of the page

calvinthedestroyer
post 30 May, 2008 - 07:29 PM
Post #3


D.I.C Head

**
Joined: 13 Oct, 2007
Posts: 94



Thanked 1 times

Expert In: QBasic, Legos

My Contributions


Since you didn't bother trying, heres some code thats untested and incomplete:
CODE

input "how many";tot
DO WHILE endFlag$  = "no"
FOR andrew = 1 TO tot
  input "number"; number(andrew)
  if andrew = tot then endflag$ = "yes"
  END IF
NEXT Count
LOOP


figure it out yourself!
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/7/08 05:55PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month