#include #include using namespace std; void warunki_poczatkowe(){ double x[20]; //Zbiór liczb double y[20]; double u[20]; double h = 0.1; // h x[0] = 0; // Warunki początkwe y[0] = -1; u[0] = 1; printf("X = %f \t Y = %f \t U = %f \n", x[0], y[0], u[0]); // Wypisuje warunki początkowe for(int i = 1; i <= 20; i++){ x[i] = x[i-1] + h; // Iteruje x; y[i] = y[i-1] + h*u[i-1]; // Iteruje y; u[i] = u[i-1] + h*(1 - x[i-1] + y[i-1]); // Iteruje u; printf("X[%d] = %f \t Y[%d] = %f \t U[%d] = %f \n", i, i, i, x[i], y[i], u[i]); // Wyspiuje iteracje } } int main() { double x[20]; double y[20]; double u[20]; double s[20]; double h = 0.1; x[0] = 0; y[0] = -1; y[20] = 1; printf("Podaj strzal u[0]"); cin >> u[0] >> u[1]; printf("Podaj strzal s[0] oraz s[1]"); cin >> s[0] >> s[1]; system("PAUSE"); return 0; }