Skip to content

Instantly share code, notes, and snippets.

@LifeMoroz
Created October 15, 2012 19:20
Show Gist options
  • Save LifeMoroz/3894572 to your computer and use it in GitHub Desktop.
Save LifeMoroz/3894572 to your computer and use it in GitHub Desktop.
Test
#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
void main()
{
setlocale (0, "russian");
double n;
double k;
double i;
double x;
double y;
cout << "Введите интервал вычисления" << endl;
cin >> n >> k;
cout << "Введите величину шага" << endl;
cin >> i ;
cout << setw(4) << "x " << setw (10) << " ||" << setw(18) << "y " << endl;
cout << "============================" << endl;
x = n;
while (x<k)
{
y=(8*(pow((log((pow(x,2)+3*x+2))/(log(5.0))),2)) + 9*((log((pow(x,2)+3*x+2))/(log(5.0)))) - 5) ;
cout << setw(4) << fixed << setprecision(0) << x << setw(10) << "||" << setw(14) << fixed << setprecision(2) << y << endl;
x=x+i;
}
system("pause");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment