A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://TheAlgorithms.github.io/C-Plus-Plus/df/dc8/successive__approximation_8cpp.html below:

TheAlgorithms/C++: numerical_methods/successive_approximation.cpp File Reference

Loading...

Searching...

No Matches

Method of successive approximations using fixed-point iteration method. More...

#include <cmath>
#include <iostream>

Go to the source code of this file.

static float  eq (float y) static float  eqd (float y) int  main ()

Method of successive approximations using fixed-point iteration method.

Definition in file successive_approximation.cpp.

◆ eq() ◆ eqd() ◆ main()

Main function

Definition at line 20 of file successive_approximation.cpp.

20 {

21 float

y, x1, x2,

sum

;

22 int i, n;

23

24 for (i = 0; i < 10; i++) {

26

std::cout <<

"value of equation at "

<< i <<

" "

<<

sum

<<

"\n"

;

27 y++;

28 }

29 std::cout << "enter the x1->";

30 std::cin >> x1;

31 std::cout << "enter the no iteration to perform->\n";

32 std::cin >> n;

33

34 for (i = 0; i <= n; i++) {

36 std::cout << "\nenter the x2->" << x2;

37 x1 = x2;

38 }

39 return 0;

40}

T sum(const std::vector< std::valarray< T > > &A)

static float eqd(float y)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4