Find Jobs
Hire Freelancers

C Project for College HW, Not C++

$15-20 USD

Concluído
Publicado há quase 22 anos

$15-20 USD

Pago na entrega
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.
ID do Projeto: 2852221

Sobre o projeto

3 propostas
Projeto remoto
Ativo há 22 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
See private message.
$17 USD em 14 dias
4,5 (17 avaliações)
3,3
3,3
3 freelancers estão ofertando em média $17 USD for esse trabalho
Avatar do Usuário
See private message.
$17 USD em 14 dias
5,0 (620 avaliações)
7,7
7,7
Avatar do Usuário
See private message.
$17 USD em 14 dias
4,9 (149 avaliações)
5,6
5,6

Sobre o cliente

Bandeira do(a) PAKISTAN
Pakistan
0,7
2
Membro desde mar. 27, 2002

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.