Fibonacci series . what is the source code
Answers
Answered by
1
class program
{
static void main
{
int i i,a=0,b=1,c;
System.out.print(a+" "+b);
for i=1;i<=n;i++;
{
c=a+b;
System.out.print(" "+c);
a=b;
b=c;
}
}
}
hope it helps u it is the full java program nd it is right nd if u want QBasic program then u can ask me..
nd plzzz mark me as brainlist
{
static void main
{
int i i,a=0,b=1,c;
System.out.print(a+" "+b);
for i=1;i<=n;i++;
{
c=a+b;
System.out.print(" "+c);
a=b;
b=c;
}
}
}
hope it helps u it is the full java program nd it is right nd if u want QBasic program then u can ask me..
nd plzzz mark me as brainlist
Moreover, there is a syntax error too.
Check that while variable declaration, you wrote int i i.
Similar questions
You forgot to initialize the value of c, which should be zero (0).
Otherwise the addition won't happen