#include <stdlib.h> #include <locale.h> #include <math.h> #include "iostream" using namespace std; int main() { int l; int t; int k; const int g = 9.81; const int p = 3.1415926; setlocale(LC_ALL, "Russian"); cout << endl << "Введите переменную l (длинна маятника)" << endl; cin >> l; // задаем значение пременной cout << endl << "Результат:" << endl; t = 2 * p * sqrt(l / g); cout << endl << "t=" << t << endl; system("Pause"); return 0; } C #include <stdlib.h> #include <locale.h> #include <math.h> #include "iostream" using namespace std; int main() { int l; int t; int k; const int g = 9.81; const int p = 3.1415926; setlocale(LC_ALL, "Russian"); cout << endl << "Введите переменную l (длинна маятника)" << endl; cin >> l; // задаем значение пременной cout << endl << "Результат:" << endl; t = 2 * p * sqrt(l / g); cout << endl << "t=" << t << endl; system("Pause"); return 0; } при расчете выдает сокращенные значения, иногда ответ вообще неправильный