Find Jobs
Hire Freelancers

C++ simple Programming (easy)

$30-250 USD

Terminado
Publicado hace alrededor de 13 años

$30-250 USD

Pagado a la entrega
Please see file for details. Write a C++ program that does the following: a. Solves the differential equation (equation 1) from 0 to 100 min in step sizes of 1 minute for the twenty combinations of 5 patch sizes and 4 body weights. This must be done using two functions that you write. The first function will be a void function called "eulers" and will execute the euler's method for a given set of parameters. The second function will be a single-result function called "yprime", and will be the function that calculates the value of the function to be integrated by "eulers" (the right side of equation 1). A common problem you will encounter is how to let the yprime function know what the values are for body weight and patch area. We recommend passing the parameters used in equation 1 as arguments passed by value, with the weight and patch size parameters for each case being changed within the main program before being passed by a function call to "eulers" and then to "yprime". b. For each of the twenty solutions, the main program determines, using numerical integration, the time-averaged concentration of the drug (Cd,ave). We recommend (but it is optional) storing the twenty values of Cd,ave in a 4x5 double-indexed array for use in parts c and d. c. In a third void function the program compares these time-averaged concentrations, Cd,ave, with the target concentration of 2.1 mg/lb to determine which size patch (i.e. area) is best suited for each body weight. The best patch size is the one that gives a Cd,ave, that is closest to the target. d. Prints the results of the computations to the screen, and to two different text files, as follows: 1. The Cd vs. time results for all 20 cases are printed to a file named cdvst.txt. Each case will be a separate table within the file. The tables will have titles for the body weight and patch area at the top, followed by column headings of t and cd (see the example below). The numbers should be printed with good formatting using iomanip functions. 2. A table listing body weight, patch area, and Cd,ave for each of the 20 cases to a file named cdave.txt. The table should have proper headings and units, and be well formatted using iomanip. 3. The final results of the calculations are printed to the screen only. These will be the best patch size for each body weight, the Cd,ave that can be achieved with that patch size, and the target value for Cd,ave .
ID del proyecto: 1015576

Información sobre el proyecto

1 propuesta
Proyecto remoto
Activo hace 13 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
interested to do this project
$30 USD en 2 días
4,0 (2 comentarios)
1,7
1,7

Sobre este cliente

Bandera de UNITED STATES
amherst, United States
4,8
1
Miembro desde abr 8, 2011

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos 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)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.