Baixe o app para aproveitar ainda mais
Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original
#include<iostream> #include<iomanip> #include<math.h> using namespace std; int main () { float tmax; float v0x; float v0y; int g=-10;//m/s*s float x; float y; float deltat; int i; float t; float vy; float vx; cout << "entre com v0x="; cin >> v0x; cout << "entre com v0y="; cin >> v0y; tmax=-(2*v0y)/g; deltat=tmax/100; for (i=0; i<=100; i++) { t=i*deltat; x=v0x*t; y=v0y*t+((g*t*t)/2); cout << "x=" << x << endl; cout << "y=" << y << endl; vx=v0x; vy=v0y+g*t; cout << "vx=" << vx << endl; cout << "vy=" << vy << endl; } }
Compartilhar