Find Jobs
Hire Freelancers

C Project for College HW, Not C++

$15-20 USD

Abgeschlossen
Veröffentlicht vor fast 22 Jahren

$15-20 USD

Bezahlt bei Lieferung
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.
Projekt-ID: 2852221

Über das Projekt

3 Vorschläge
Remote Projekt
Aktiv vor 22 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
Vergeben an:
Avatar des Nutzers
See private message.
$17 USD in 14 Tagen
4,5 (17 Bewertungen)
3,3
3,3
3 Freelancer bieten im Durchschnitt $17 USD für diesen Auftrag
Avatar des Nutzers
See private message.
$17 USD in 14 Tagen
5,0 (620 Bewertungen)
7,7
7,7
Avatar des Nutzers
See private message.
$17 USD in 14 Tagen
4,9 (149 Bewertungen)
5,6
5,6

Über den Kunden

Flagge von PAKISTAN
Pakistan
0,7
2
Mitglied seit März 27, 2002

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.