How to use C # algorithm to solve the nth numerical problem
This article mainly shows you "how to use the C# algorithm to solve the nth numerical problem", the content is easy to understand, clear, hope to help you solve the doubt, the following let the editor lead you to study and learn "how to use the C# algorithm to solve the nth numerical problem" this article.
Known sequence: 1, 1, 1, 2, 3, 5, 8, 13, 13, 21, 34. Find the 50th value? And write the algorithm with c #?
The implementation of C# algorithm is as follows:
/ / n: the nth value required, using the C # algorithm to solve private int getValues (int n) {int iMagnec jpencil, temp=0; if (n)