c# fibonacci sequence
using System;
class Program
{
public static int Fibonacci(int n)
{
int a = 0;
int b = 1;
// In N steps compute Fibonacci sequence iteratively.
for (int i = 0; i < n; i++)
{
int temp = a;
a = b;
b = temp + b;
}
return a;
}
static void Main()
{
for (int i = 0; i < 15; i++)
{
Console.WriteLine(Fibonacci(i));
}
}
}
Also in C#:
- disable mouse unity
- Move player on planets in unity 2d
- c# how to convert string to int
- c# sort array
- c# cheat sheet
- c# arraylist contains
- sending data photon c#
- how to name GameObject in c#
- c# empty IEnumerable
- position eines fenster ändern visual studio
- c# datatable copy selected rows to another table
- c# repeat string x times
- unity clamp rotation
- using in c#
- how to compare datetime in c#
- unity collider2d contains point
- swith c#
- windows form rounded corners
- unity change tag in script
- remove from list based on condition c#
- unity load text resources from subfolder
- unity key detection
- c# mailmessage set sender name
- dont destroy on load unity