| | |
desperate! having serious issuses
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Mar 2005
Posts: 1
Reputation:
Solved Threads: 0
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.
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.
•
•
Join Date: Mar 2004
Posts: 1,620
Reputation:
Solved Threads: 51
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
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
![]() |
Similar Threads
- Desperate for password protection (HTML and CSS)
- Please Read....Im desperate... (Troubleshooting Dead Machines)
- Desperate Call For Help!! (Windows NT / 2000 / XP)
- c++/unix fork(), fifo's, desperate need of help (C++)
Other Threads in the C Forum
- Previous Thread: Input for a solution to matrix problem
- Next Thread: matrices
| Thread Tools | Search this Thread |
#include adobe ansi api array arrays asterisks binarysearch calculate centimeter char convert copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax directory dynamic fflush file fork forloop framework frequency getlasterror givemetehcodez grade graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators infiniteloop kernel km linked linkedlist linux linuxsegmentationfault list lists locate logical_drives looping loopinsideloop. match matrix microsoft motherboard multi mysql number open opendocumentformat opensource owf pattern pdf performance pointer pointers posix probleminc process program programming radix recursion recv repetition research scanf scheduling scripting segmentationfault send sequential shape socket socketprograming stack standard string strings systemcall testautomation threads turboc unix user variable voidmain() wab windows.h






