| | |
desperate! having serious issuses
![]() |
•
•
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 |
adobe api array arrays binarysearch calculate char cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory dynamic feet fflush file floatingpointvalidation fork forloop frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators intmain() iso kernel kilometer km linked linkedlist linux linuxsegmentationfault list locate logical_drives loopinsideloop. match matrix microsoft motherboard mqqueue mysql oddnumber odf open opendocumentformat opensource openwebfoundation owf pattern pdf performance pointer posix power probleminc program programming pyramidusingturboccodes read recursion recv recvblocked repetition research scanf scheduling segmentationfault send shape socketprograming socketprogramming stack standard strchr string suggestions systemcall test unix urboc user variable voidmain() wab win32api windows.h






