answersLogoWhite

0

<html>

<head>

<title>asp</title>

</head>

<%

dim f1,f2,f3,c

f1=0

f2=1

response.Write(f1 &"<br>")

response.write(f2 &"<br>")

c=1

while(c<=10)

f3=f1+f2

response.write(f3 &"<br>")

c=c+1

f1=f2

f2=f3

wend

%>

</html>

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Write a java program to print the last digit in Fibonacci series?

Just generate the Fibonacci numbers one by one, and print each number's last digit ie number%10.


What is the program to print Fibonacci series in qbasic?

CLS a = 0 b = 0 FOR i = 1 TO 10 IF a = 0 THEN f = 1 END IF PRINT f b = a a = f f = a + b NEXT i END from : Parth jani parthjani7@yahoo.com


Write a program to print the Fibonacci series in php upto input value using recursive function?

The Fibonacci sequence uses recursion to derive answers. It is defined as: F0 = 0 F1 = 1 Fn = F(n - 1) + F(n -2) To have this sequence printed by a php script use the following: function fibonacci($n) { if($n 1) return 1; //F1 else return fibonacci($n - 1) + fibonacci($n - 2); //Fn } This recursive function will print out the Fibonacci number for the integer n. To make it print out all the numbers in a particular set add this to your script. for($i = 0; $i &lt; 15; $i++) { echo fibonacci($i) . "&lt;br /&gt;"; } So your final result would look like. &lt;?php function fibonacci($n) { if($n 1) return 1; else return fibonacci($n - 1) + fibonacci($n - 2); } for($i = 0; $i &lt; 15; $i++) { echo fibonacci($i) . "&lt;br /&gt;"; } ?&gt;


Write a C program to print the following series 112 122 . 1n2?

write a program to print the series 1/12+1/22+.........+1/n2 ?


You want python program to find fibbonaci series?

The Fibonacci series is a sequence of numbers, with the first two defined as 0 and 1, and all following numbers defined as the sum of the two previous numbers. The following python program asks a user how many Fibonacci numbers they want calculated, then calculates them. NOTE: This site removes formatting from answers. Replace (tab) with a tab, or four spaces. #!/usr/bin/python print("This program finds Fibonacci numbers.") answer = "y" while answer == "y": (tab)print("How many terms would you like?") (tab)n = int(input(": ")) (tab)a = 0 (tab)b = 1 (tab)for i in range(0,n): (tab)(tab)print(str(a) +",") (tab)(tab)c = a + b (tab)(tab)a = b (tab)(tab)b = c (tab)print("Would you like to run again? (y/n)") (tab)answer = input(": ")


How do you write a program to print Fibonacci series of n numbers using recursion in cpp?

#include&lt;iostream&gt; unsigned fib (unsigned term, unsigned a=0, unsigned b=1) { if (term&lt;1) return a; return fib (--term, a+b, a); } int main() { std::cout &lt;&lt; "Fibonacci (1000th term): " &lt;&lt; fib (1000) &lt;&lt; std::endl; }


Write a java program to print the result in the series?

If you have the series stored in an array, you loop through the array and print each array element in turn. Another possibility is to print out the numbers in the series as you generate them. In that case, you may not need to store anything (depending on the series, of course).


Write a C program Fibonacci using normal loops and conditional statements?

to print the Fibonacci series until 100 you can take the input in d to make it run for whatever value you want void main(){ int a,b,c,d; a=0; b=1; c=1; d=100; while(c&lt;d) { printf("%d\n",c); c=a+b; a=b; b=c; } }


Write a shell program to generate fibnacci series using while loop?

//WAP to print fibonacci series using do-while loop.? using System; class Fibonacci { public static void Main() { int a=1,b=1; int sum=0; Console.Write("Enter Limit:"); int n=Int32.Parse(Console.ReadLine()); Console.Write(a); Console.Write(b); do { sum=a+b; a=b; b=sum; Console.Write(sum); } while(sum&lt;n); } } By-Vivek Kumar Keshari


Logic for Fibonacci series in delphi?

i=0 j=0 sum=1 limit = ARGV[0] while sum &lt; limit print sum i = j j = sum sum = i + j end


Write a program to genarate Fibonacci series upto sum numbers?

void main() { int n,old=0,curr=1,new=0; clrscr(); printf("enter the total number of terms up to which you want to print the Fibonacci series"); scanf("%d",&amp;n); printf("%d",old); printf("\n%d",curr); for(i=1;i&lt;=n;i++) { new=old+curr; old=curr; curr=new; printf("\n%d",new); } getch(); }


Write a java program to generate the Fibonacci Series using for loop?

class Fibonacci { public static void main(String args[]) { System.out.println("enter the number upto u want"); int number=Integer.parseInt(args[0]); int a=0,b=1,c=0; System.out.print(a+" "+b); for(int i=1;i&lt;=number;i++) { c=a+b; System.out.print(c+" "); a=b; b=c; } } } the number are given to the run time where are print the series eg: 5 0 1 1 2 3 5 8 13................