Find Jobs
Hire Freelancers

C Project for College HW, Not C++

$15-20 USD

Completed
Posted almost 22 years ago

$15-20 USD

Paid on delivery
Need the following ASAP: 1. I need all 3 problems solved in the next 8 hours. 2. I need the program to be written in C and NOT C++. 3. It has to be well commented. 4. I need it by 9:00am United States CT. 5. It needs to be compiled in Microsoft Visaul C++ 6.0. 6. The code file should be .c ## Deliverables Assignment 2 Problem 1 Due May 21, 2002 Implement a cube root algorithm that comes from Isaac Newton. The method involves making a guess, using the guess to get a better guess, and continuing this process until the difference between two successive guesses is so small you consider the problem solved. Write a program that uses an iterative algorithm for approximating the cube root of any positive number A, which the user inputs into the program. The algorithm is as follows: take any initial approximation X1 that is positive, and then find a new approximation, X2, by calculating a weighted average of X1 and A/(X1*X1), that is X2 = 2/3*X1 + 1/3*A/(X1*X1) (of course not with integers, and you may have to worry about the fractions 2/3 and 1/3). Repeat this procedure with X1 replaced by this new approximation, stopping when X1 and X2 differ in absolute value (use the function fabs( ) which is in ) by some specified error allowance, such as .000001. Then you are computing the cube root of A to an accuracy of 6 decimal places. The initial approximation should be some automatic guess of the cube root of A. The iterative method should work for any guess you choose. It doesn't have to be that accurate. Then allow the user to find more cube roots if he wishes. In other words, allow the user to go back and repeat this operation as many times as he wants to compute new cube roots. Problem 2 Due May 21, 2002 Write a program that is menu driven and that helps a person balance his or her checkbook. The program should start by asking the user for the month's opening account balance. Then the program should display a menu that lists the following choices: D for a deposit, C for a check, W for a withdrawal, and Q to quit. The menu should be displayed in a loop until the user selects Q, the option to quit. If the user selects D, ask the user to enter the amount of the deposit, and add the amount to the account balance. If the user enters C, ask the user for the amount of the check, and subtract the amount from the balance. If the user enters W, ask the user for the amount of the withdrawal, and subtract the amount form the balance. When the user enters Q, the program should display the opening balance, the total amount deposited, the total amount withdrawn, the total amount of the checks, and the final balance. If the user enters something other than D, W, C, or Q, the program should issue an error message and redisplay the menu. Allow the user to enter either uppercase or lowercase letters. One more requirement is to write functions for the menu, and for the selections D, C, and W. You need not use a function for the Q option. Remember the program should loop until the user decides he is done by selecting the Q option. Problem 3 Due May 21, 2002 Write a program that models a simple calculator. Each data line should consist of the next operation to be performed from the list below and the right operand or a number to apply the operation to. Assume you are applying the operator to an accumulator value that starts with 0 which is assumed to be on the left in each case. You need a function scan_data( ) with two output parameters that returns the operator and right operand scanned from the data line. You also need a function do_next_op( ) that performs the required operation. The function do_next_op( ) requires two input parameters ( the operator and the operand ) and one input/output parameter (the accumulator). The valid operators are: + add - subtract * multiply / divide ^ power (raise left operand to power of right operand - this is not a C operator - use the pow( ) function in ) q quit Your calculator should display the accumulator value after each operation. A sample run follows: + 5.0 result so far is 5.0 ^ 2.0 result so far is 25.0 / 2.0 result so far is 12.5 q 0 final result is 12.5 ## Platform Need the following ASAP: 1. I need all 3 problems solved in the next 8 hours. 2. I need the program to be written in C and NOT C++. 3. It has to be well commented. 4. I need it by 9:00am United States CT. 5. It needs to be compiled in Microsoft Visaul C++ 6.0. 6. The code file should be .c ## Deadline information I need the prooject 8 hours from bidding start date.
Project ID: 2852221

About the project

3 proposals
Remote project
Active 22 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$17 USD in 14 days
4.5 (17 reviews)
3.3
3.3
3 freelancers are bidding on average $17 USD for this job
User Avatar
See private message.
$17 USD in 14 days
5.0 (620 reviews)
7.7
7.7
User Avatar
See private message.
$17 USD in 14 days
4.9 (149 reviews)
5.6
5.6

About the client

Flag of PAKISTAN
Pakistan
0.7
2
Member since Mar 27, 2002

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.