Name: Anonymous 2009-03-30 19:24
im not very well versed to say the least in expressing mathematical formula in C++
y = 1 - t - (t^2)/2 + (t^4/12) + t^5/30 + (t^6)/180
this is the formula i need to express
t(ime) being the user input variable and y being the output
just need some direction. i got to about here :P
#include <iostream>
using namespace std;
main()
{
int time;
cout << "Enter value of variable time: \n";
cin >> time;
y = 1 - t - (t^2)/2 + (t^4/12) + t^5/30 + (t^6)/180
this is the formula i need to express
t(ime) being the user input variable and y being the output
just need some direction. i got to about here :P
#include <iostream>
using namespace std;
main()
{
int time;
cout << "Enter value of variable time: \n";
cin >> time;