Advertisement
sactage

Untitled

Aug 31st, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. Program 1: Test Scores
  2. Write a program that processes test scores…
  3. • Read a list of scores in from a file (one per line).
  4. • Output a letter grade for each as well as “pass” or “fail” (fail is less than 65).
  5. • Output the number of scores processed and the class average.
  6. • Output the maximum and minimum scores in the list.
  7. • Gorilla proofing: Adjust your program to handle negative scores or scores above 100 appropriately.
  8.  
  9. Program 2: Square Roots
  10. Write a program that finds the square root of a number accurate to 3 decimal places without using sqrt!
  11. • The user inputs the number that needs rooting
  12. • The computer guesses where to start
  13. • The computer iterates the following until done…
  14. ..............................Newguess = 0.5 (lastguess + (number / lastguess) )
  15. ..............................(How will you test if done without using the squareroot method?)
  16. • Output each guess.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement