using System;
class Program
{
public static void Main()
{
int a = 0, b = 1;
Console.WriteLine("Please Enter your Target?");
int target = int.Parse(Console.ReadLine());
Console.Write(a+"\t");
for (; b < target;)
{
Console.Write(b+"\t");
b = a + b;
a = b - a;
}
Console.WriteLine("\n");
}
}
class Program
{
public static void Main()
{
int a = 0, b = 1;
Console.WriteLine("Please Enter your Target?");
int target = int.Parse(Console.ReadLine());
Console.Write(a+"\t");
for (; b < target;)
{
Console.Write(b+"\t");
b = a + b;
a = b - a;
}
Console.WriteLine("\n");
}
}
No comments:
Post a Comment