desperate! having serious issuses

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2005
Posts: 1
Reputation: ibmackin is an unknown quantity at this point 
Solved Threads: 0
ibmackin ibmackin is offline Offline
Newbie Poster

desperate! having serious issuses

 
0
  #1
Mar 22nd, 2005
how the hell do you do this?!
please help asap!
a. This problem is similar to the problem in your last assignment. However, this time you will need to keep track of all integers input by the user.
b. Create a program that will read a series of ten (10) positive integers (entered one at a time) from the user. Once all integers have been entered, display the following statistics on the data:
i. the sum of all integers
ii. the average of the integers
iii. the smallest integer
iv. the largest integer
v. a list of the integers in reverse order from the order in which they were entered
c. For an additional challenge, add the following functionality:
i. If the user types in a negative integer, continue to prompt them until they enter a positive integer. When they do enter a positive integer, it will count as one of the 10 integers requested.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,766
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 742
Team Colleague
Narue's Avatar
Narue Narue is online now Online
Code Goddess

Re: desperate! having serious issuses

 
0
  #2
Mar 22nd, 2005
>how the hell do you do this?!
Start by learning from the previous assignment, as this assignment suggests. We don't do homework for you, show an attempt or you'll encounter nothing but stoney silence.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 1,620
Reputation: kc0arf is a jewel in the rough kc0arf is a jewel in the rough kc0arf is a jewel in the rough 
Solved Threads: 51
Team Colleague
kc0arf kc0arf is offline Offline
Posting Virtuoso

Re: desperate! having serious issuses

 
0
  #3
Mar 23rd, 2005
Hi,

If you are completely lost with it, try some psuedo code to help you out.

Function to read in 10 numbers
--> Don't forget error checking

Function to add them up

Function to average them

Function to find smallest

Function to find largest

Function to list in reverse

Main program to manage the calling of the functions.

Now, you are going to need to fill in the functions with what needs to happen. How do you find the largest? How do you list them in reverse?

You are going to need to choose some storage data types... Perhaps an Array, perhaps a double-linked list. You are going to need some variables.

And it is your assignment, so please get some ideas on paper, and come back if you have some syntactical questions, such as the difference between an assignment, and an equal comparison.

Christian
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 489
Reputation: Acidburn is an unknown quantity at this point 
Solved Threads: 5
Acidburn Acidburn is offline Offline
Posting Pro in Training

Re: desperate! having serious issuses

 
0
  #4
Mar 23rd, 2005
try putting the 10 ints into an array ? Then getting the array populated from the user? Then performing the maths after ???
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 445
Reputation: 1o0oBhP is an unknown quantity at this point 
Solved Threads: 6
1o0oBhP's Avatar
1o0oBhP 1o0oBhP is offline Offline
Posting Pro in Training

Re: desperate! having serious issuses

 
0
  #5
Mar 23rd, 2005
ibmackin have you tried any code at all, if so post it. The forum rules say we dont do homework for you, but we will have a go at fixing mistakes in homework you HAVE ALREADY DONE! |
http://sales.carina-e.com

no www
no nonsense

coming soon to a pc near you! :cool:
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC