Program to Print the Fibonacci sequence | Javascript Tutorial

preview_player
Показать описание
Program to Print the Fibonacci sequence | Javascript Tutorial
In This Tutorial, We will learn about the Program to Print the Fibonacci sequence | Javascript Tutorial Full Tutorial Step By Step with proper guidance.

Please subscribe and press the bell icon to receive daily updates

#Fibonaccisequence #JavascriptTutorial #Javascript
Рекомендации по теме
Комментарии
Автор

Bhaiya Ji Thank You.. Bahut Simple tha ye

brownsugar
Автор

a=b, b=temp....reminds me of that scene from govinda's movie "haseena maan jaegi" when paresh raval says "ohhh saab ji...jo chacha hai, wo bhatija hai...aur jo bhatija hai, wo chacha hai".

thecodelife
Автор

<?php $fp1 = fopen("sample1.txt", "r");
$fp2 = fopen("sample2.txt", "w");
$FileContents = fread($fp1, 15);
echo "The contents of First file are:
while(! feof($fp1))
{
echo fputs($fp2, $FileContents). "<br />"; if($fp1!=false) break;
}
printf("File copied successfully.\n"); fclose($fp1);
fclose($fp2);
?>

blackscreenstatus
Автор

output correct rhta but code likhne ka tarika sahi kr do sir kha ka kha console likh dete ho student achhhe se smjh nhi pate confused hote hai pura complite program likha kro

prafulsomkuwar
Автор

#include<stdio.h>
#include<string.h>
void pm();
void plus();
void div();
int i, ch, j, l, addr=100;
char ex[10], exp[10], exp1[10],exp2[10],id1[5],op[5],id2[5];
void main()
{
clrscr();
while(1)
{
the choice:");
scanf("%d", &ch);
switch(ch)
{
case 1:
printf("\nEnter the expression with assignment operator:");
scanf("%s", exp);
l=strlen(exp);
exp2[0]='\0';
i=0;
while(exp[i]!='=')
{
i++;
}
strncat(exp2, exp, i);
strrev(exp);
exp1[0]='\0';
strncat(exp1, exp, l-(i+1));
strrev(exp1);
printf("Three address code:\ntemp=%s\n%s=temp\n", exp1, exp2);
break;

case 2:
printf("\nEnter the expression with arithmetic operator:");
scanf("%s", ex);
strcpy(exp, ex);
l=strlen(exp);
exp1[0]='\0';

for(i=0;i<l;i++)
{
if(exp[i]=='+'||exp[i]=='-')
{

{
pm();
break;
}
else
{
plus();
break;
}
}
else if(exp[i]=='/'||exp[i]=='*')
{
div();
break;
}
}
break;

case 3:
printf("Enter the expression with relational operator");
scanf("%s%s%s", &id1, &op, &id2);
if(((strcmp(op, "<")==0)||(strcmp(op, ">")==0)||(strcmp(op, "<=")==0)||(strcmp(op, ">=")==0)||(strcmp(op, "==")==0)||(strcmp(op, "!=")==0))==0)
printf("Expression is error");
else
{
printf("\n%d\tif %s%s%s goto %d", addr, id1, op, id2, addr+3);
addr++;
printf("\n%d\t T:=0", addr);
addr++;
printf("\n%d\t goto %d", addr, addr+2);
addr++;
printf("\n%d\t T:=1", addr);
}
break;
case 4:
exit(0);
}
}
}
void pm()
{
strrev(exp);
j=l-i-1;
strncat(exp1, exp, j);
strrev(exp1);
printf("Three address code:\ntemp=%s\ntemp1=%c%ctemp\n", exp1, exp[j+1], exp[j]);
}
void div()
{
strncat(exp1, exp, i+2);
printf("Three address code:\ntemp=%s\ntemp1=temp%c%c\n", exp1, exp[i+2], exp[i+3]);
}

void plus()
{
strncat(exp1, exp, i+2);
printf("Three address code:\ntemp=%s\ntemp1=temp%c%c\n", exp1, exp[i+2], exp[i+3]);
}

asifcreations
Автор

Thank you so much for making this video. What to do if we want output in array format for example [0, 1, 1, 2, 3, 5] ?

abhisheksathe