# finalsp01 - EGN 3210 Final NAME_ Spring 2001 SS#_ To...

This preview shows pages 1–4. Sign up to view the full content.

EGN 3210 Final Spring 2001 NAME_____________________________ SS#_____________________________ To receive maximum partial credit, clearly show all of your work. 1. ( Functions ) Write a function to perform division. The function is to accept 3 doubles, the numerator and the denominator and a pointer to the remainder. The function is to divide the 2 doubles and produce a quotient and a remainder. The quotient is to be returned through the function name and the remainder through the pointer in the third parameter. Assume you have the functions floor ( ) which returns the integer part of a double and the function frac( ) which returns the fractional part of a double. Algorithm: Result = numerator / denominator; Quotient = floor(result) Remainder = frac(result) * denominator

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2. ( File ) Write a program to open two files called “input1.dat” and “input2.dat” both for input. Read the first 5 integers from each file and compute the sum of the 10 integers. Print the sum then close the files. Print an error message if the file cannot be opened.
3. ( Classes)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 05/11/2008 for the course EGN 3210 taught by Professor Fernando during the Fall '05 term at University of Central Florida.

### Page1 / 7

finalsp01 - EGN 3210 Final NAME_ Spring 2001 SS#_ To...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online