Following logic for Fibonocci int f1=0; intf2=1; int i=0; while(i
<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>
f1 f2 f3 f4 f5
try this out...#include#includefloat valcal(float);int main(){float a,b,f,x,f1,f2,f3,i;a=2;b=3;int flag=0;f1=valcal(a);f2=valcal(b);printf("\n\n%f %f",f1,f2);for(i=0;i
#include<stdio.h> #include<conio.h> int main(void) { int n,f1=0,f2=1,f3=0,i=1; printf("Enter the Number :\n\t\t"); scanf("%d",&n); printf("%d %d",f1,f2); while(i<=n-3) { f3=f1+f2; printf("%d",f3); f1=f2; f2=f3;i++; } getch(); }
#include<stdio.h> #include<conio.h> void main() { int i,n,f1=0,f2=1,f3; clrscr(); for (i-0;i<10;i++) { f3=f1+f2; f1=f2; f2=f3; printf("%d \n",f3); } getch(); } output 1 2 3 5 8 13 21 34 55 89
class lift { public static void main(String args[]) { int f1,f2,f3; f1=1; f2=2; f3=3; ch=3; switch(ch) { case 1: f1=1; System.out.println(f1); break; case 2: f2=2; System.out.println(f2); break; case 3: f3=3; System.out.println(f3); break; default: System.out.println("remaining floors"); } } }
f1 f2 f3 f4 f5
You sum up the frequencies upto and including the current band. So if you have data bands b1, b2, b3 and so on with frequencies f1, f2, f3 etc then the cumulative frequency for b1 = f1 b2 = f1+f2 b3 = f1+f2+f3 and so on.
The F1, F2, and F3 designation on a dog breed designates the breeding. A Pure Bred Poodle and a Pure Bred Maltese makes a F1 MaltiPoo. When a MaltiPoo and MaltiPoo are bred, it gets a F2 designation.
#include<conio.h> #include<stdio.h> main () { int f1=0,f2=1,f3=1,i,j,n; clrscr(); printf("enter n value"): scanf("%d",&n); if(n<=3) { for(i=0;i<=n;i++) { f1=f2; f2=f3; printf("%dfibonic value is\n",f3); f3=f1+f2; } else { printf("re ente n value"); } getch(); }
try this out...#include#includefloat valcal(float);int main(){float a,b,f,x,f1,f2,f3,i;a=2;b=3;int flag=0;f1=valcal(a);f2=valcal(b);//printf("\n\n%f %f",f1,f2);for(i=0;i