Gadget Miracles, Tracfone LG Smartphone Comparison, Android Jelly Bean, Flash tool, Avengers Box, Ulefone, samsung, iphone, Infinix and stock firmware

Selasa, 24 Desember 2013

C# Program to Print Fibonacci series

C# Program to Print Fibonacci series - I made this blog Gadget Miracles already a few years ago, although I am busy working in my office still build this blog for you who need information about gadgets, has very much information that we provide about the C# Program to Print Fibonacci series which you are looking for at this time, please refer to the information we provide in full guarantee because I have collected a lot of information from the source of the richest:

Articles : C# Program to Print Fibonacci series
full Link : C# Program to Print Fibonacci series
Article Csharp, Article programming, Article programs,

You can also see our article on:


C# Program to Print Fibonacci series

C# Program to Print Fibonacci series

Program Statement:
Write a program which prints the Fibonacci series using loop.
1 1 2 3 5 8 13 21 34 …

Solution:
 public class _fib
{
int f = 0, s = 1, n, fib = 0;
public void _show()
{
Console.WriteLine("\n\t\tPrint fibonacci series 0 1 1 2 3 5 8 13 ...\n\n");
Console.Write("\n\t\tEnter range of terms of fibonacci series : ");
n = Convert.ToInt32(Console.ReadLine());
Console.Write("\n\t\tFirst {0} terms are : ", n);
for (int x = 0; x < n; x++)
{
if (x <= 1)
{ fib = x; }
else
{
fib = f + s;
f = s;
s = fib;
}
Console.Write("{0} ", fib);
}
Console.WriteLine("\n");
}
}




enough already information about C# Program to Print Fibonacci series

hopefully the information C# Program to Print Fibonacci series can give you answers to all your questions ayang is conveyed to google.

finished already information about C# Program to Print Fibonacci series if you mers this information useful for you and want to bookmark or share please use link https://19miracles.blogspot.com/2013/12/c-program-to-print-fibonacci-series.html

Tag : , , ,
Share on Facebook
Share on Twitter
Share on Google+

Related : C# Program to Print Fibonacci series

  • C# Program to Print Triangle in Square C# Program to Print Triangle in SquareProgram Statement:Write a program which display the following output on the screen.####$#######$#$#####$###$###$#####$#$#######$Sol ...
  • How to become a Computer ProgrammerComputer programming, also known as programming, coding, or software development (there are subtle differences between each term), is the process of “writing instruction ...
  • Convert C Coding into C# Coding without using goto StatementConvert C Coding into C# Coding without using goto StatementProgram Statement:How many printf statements will be executed by this program and rewrite the following progr ...
  • How do i begin learning code?Hello people! We Intelligent Computing are about to start a whole new section on Programming but before we start on that I would highly recommend you to read this articl ...
  • C# Program to check number is prime or composite C# Program to check entered number is prime or composite Program Statement:Write a program that takes an integer as an input from user and prints if it is a prime o ...

0 komentar:

Posting Komentar