convert C code to C++
$10-30 USD
Pagado a la entrega
I have some code written in C, its need to be converted to C++.
#include <stdio.h> //declares printf()
//differential equation that models the parachutist problem
double dydt( double t, double y) /* dy/dt = g - c/m * y (page 14) */
{
const double g = 9.81, m = 68.1, c = 12.5;
return g - c/m * y;
}
//generic euler's method to solve dy( t, y) equation
double euler( double dt, double ti, double tf, double yi)
{
double t = ti;
double y = yi;
double h = dt;
do {
if (t + dt > tf)
h = tf - t;
printf("%.4f\t%.4f\n", y, t); //display y, v values
y = y + dydt( t, y) * h;
t = t + h;
} while (t < tf);
return y;
}
//program starts here
int main()
{
double ti = 0, tf = 36, yi = 0, dt = 2;
//display table header for velocity and time
printf("v (m/s)\tt (s)\n");
//run euler's method to solve parachutist
double y = euler( dt, ti, tf, yi);
printf("\nfinal y = %.4f (m/s)\n", y);
return 0;
}
Nº del proyecto: #11559874
Sobre el proyecto
Adjudicado a:
Hi, I have more than 20 years programming in both C and C++, I am sure I can do this project quickly
8 freelancers están ofertando un promedio de $22 por este trabajo
ZERO ERROR GUARANTEED!! Please read my reviews. Hi, I can do this for you quickly and with great quality for cheap...Based in Nepal we provide quality work, and 100% satisfaction guarantee..We are not satisfied wit Más
-----------------------------------------------------------------Nice Job! No Problem!-------------------------------------------------------------
We are team of excellent developers. We have 2 year experience related to your project field. We can do your project and solve your all problems according to your requirements. We have read your description for project Más
my whatsapp +923245064589................................................................................................
I have developed c, c++ programs for a long time. I can do it this time. If you want, please let me know. Thank you.
I am familiar with bot C and C++ and can do this. looking forward to working on this.........................
We are team of excellent developers. We have 2 year experience related to your project field. We can do your project and solve your all problems according to your requirements. We have read your description for project Más