Back again for Fibonacci sequence
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
2 posts
Page 1 of 1
Right i am buildling an app that needs to know all the numbers in Fibonacci sequence as someone put in say 1293 and then it tells them if it is in the sewquence and then also tells them the number before and after weather it is or is not in Fibonacci sequence or not soo any ideas people
This is Fibonacci related.
Not quite what you want, but it's enough, if you ask for even more help you should start with something more simple.
C# - Coded by DreadNought, le me.
Not quite what you want, but it's enough, if you ask for even more help you should start with something more simple.
C# - Coded by DreadNought, le me.
Code: Select all
using System;
using System.Collections.Generic;
namespace ProjectEaulaProblem2
{
class Program
{
private static uint[] numbers = new uint[]
{
1, 2, 3, 5, 8, 13, 21, 34, 55, 89
};
private static List<uint> numbs = new List<uint>(numbers);
static void Main()
{
uint c = numbs[numbs.Count - 1] + numbers[numbs.Count - 2];
int prevIndex = (numbers.Length - 1);
uint nextnum = numbers[prevIndex] + numbers[prevIndex - 1];
Console.WriteLine("Next number = {0}", nextnum);
Console.WriteLine("Real number = {0}", 55 + 89);
Console.ReadLine();
}
}
}
Bound and boom tech,
The Future Of Coding
The Future Of Coding
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023