kirya_shkolnik

Лев лови

Mar 3rd, 2021 (edited)
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. double f(double x, double e,double Nm, ::System::Windows::Forms::ListBox^ LB)
  2. {
  3.     int n=0;
  4.     double s=0;
  5.     double a=1;
  6.     while (fabs(a)>e && n<=Nm)
  7.     {
  8.         System::String^ outs = System::String::Format("    {0,2:D2}             {1,15:F9}             {2,15:F9}",n,a,s);
  9.         LB->Items->Add(outs);
  10.         s=s+a;
  11.         a=a*x/n;
  12.         n++;
  13.     }
  14.     return s;
  15. }
  16.  
Add Comment
Please, Sign In to add comment