Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <string>
- using namespace std;
- int main ()
- {
- double c = 12, g = 10, m = 0, h;
- double v;
- int j = 0;
- double V[4] = {70, 0, 0, 0};
- cout << "Digite a sua massa: ";
- cin >> m;
- v = g - ((c / m) * V[j]);
- h = V[j+1] - V[j];
- for (j = 1; j < 4; j++)
- V[j] = V[j-1] + h * v;
- for ( j = 0; j < 4; j++)
- cout << "V[" << j << "]\t" << V[j] << "\n";
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement