Untitled

 avatar
unknown
plain_text
a year ago
704 B
4
Indexable
#include <iostream>
#include <cmath>

using namespace std;

const double g = 9.81;

int main() {
	setlocale(LC_ALL, "Russian");
	double v, angle, height, x, y, step;
	int quantity_of_points;

	cout << "Задай скорость(м/c): \n";
	cin >> v;
	cout << "Задай угол запуска(градусы): \n";
	cin >> angle;
	cout << "Задай высоту(м): ";
	cin >> height;

	step = 10;
	quantity_of_points = 20;
	x = 0;

	for (int i = 0; i < quantity_of_points; i++){
		x += step;
		y = height * x * tan(angle) - (g * pow(x, 2)) / (2 * pow(v, 2) * pow(cos(angle), 2));
		cout << "Координаты точки: (" << x << ';' << y  << ')' << endl;
	}
}
Editor is loading...
Leave a Comment