Checkout
checkout
view
Your Cart Your Cart: item(s)
View Details $1.99 Download Add to Cart

Functions

The graph of a person's emotional cycly y=f(x) is a sinc curve having an amplitude of 1 and a period of 28 days. On a given day, the person's emotional index is f(age), where age is his or her age in days. Similarly, the physical and intellectual cycles are sine curves having an amplitude of 1 and periods of 23 and 33 days, respectively. Write a function that receives a person's age and returns his or her physical, intellectual, and emotional indices for the current day. Write another function to compute a person's biorhythm index, which is the sum of the physical, intellectual, and emotion cycles. Write a driver progem to test your functions.

Subject:

Computer Science

Topic:

Other

Posting ID:

31636

OTA ID:

104632

View Details $1.99 Download Add to Cart

Functions

Write a function calculateTaxes () that calculates and returns the amount of city incom tax and the amount of federal income tax to be withheld from an employee's pay for one pay period. Assume that city income tax withheld is computed by taking 1.15 percent of gross pay on the first $40,000 earned per year and that federal income tax withheld is computed by taking the gross pay less $50 for each dependent claimed and multiplying by 20 percent. Use this function in a program that for each of several employees reads the employee's number, number of dependents, hourly pay rate, city income tax withheld to date, federal income tax withheld to date, and hours worked for this period and then ca... click for more

Subject:

Computer Science

Topic:

Other

Posting ID:

31637

OTA ID:

104632

View Details $1.99 Download Add to Cart

Currency conversion program to convert one currency into another using an exchange rate. The loop termination is controlled by End of File marker.

Write a program that reads an exchange rate for converting English currency to U.S. currency and then reads several values in English currency and converts each amount to the equivalent U.S. currency. Display all amounts with appropriate labels. Use sentinel-controlled or end-of-file-controlled loops for the input.

Subject:

Computer Science

Topic:

Other

Posting ID:

31638

OTA ID:

103644

View Details $1.99 Download Add to Cart

Repetition

The divide-and-average algorithm for approximating the square root of any positive number a is as follows: Take any initial approximation x that is positive, and then find a new approximation by calculating the average of x and a/x, that is, (x + a/x)/2. Repeat this procedure with x replaced by this new approximation, stopping when x and a/x differ in absolute value by some specified error allowance, such as 0.00001. Write a program that reads values for x, a, and the small error allowance and then uses this divide-and-average algorithm to find the approximate square root of x. Execute the program with a=3 and error allowance=0.00001, and use the following initial approximationa: 1, 10, 0... click for more

Subject:

Computer Science

Topic:

Other

Posting ID:

31639

OTA ID:

104632

View Details $1.99 Download Add to Cart

Repetition

Write a program that classifies n as being deficient, perfect, or abundant for n=20 to 30, then for n=490 to 500, and finally for n=8120 to 8130.

Subject:

Computer Science

Topic:

Other

Posting ID:

31640

OTA ID:

103997

Page generated in 0.1196 seconds

About Us ·  Contact Us ·  Samples ·  Solutions ·  Legal Terms and Conditions ·  Privacy Policy

©2008 SolutionLibrary.com

Search for Solutions About Us Samples