#include #include "oscillatore.h" #include "eulero.h" using namespace std; int main() { double x[2], h, tmax; cerr << "Inserisci la posizione al tempo 0: "; cin >> x[0]; cerr << "Inserisci la velocita' al tempo 0: "; cin >> x[1]; cerr << "Integro fino al tempo: "; cin >> tmax; cerr << "con passo: "; cin >> h; double t=0; while (t<=tmax) { cout << t << "\t" << x[0] << "\t" << x[1] << endl; eulero(t,h,2,x,oscillatore); } }