Answer Posted / siggi
class hcl
{
public static void main(String arg[])
{int a=0;
int b=1;
int i=1;
int x,y;
/*System.out.println("enter the no.");*/
x=Integer.parseInt(arg[0]);
if(x==0 || x==1)
{ System.out.println("yes it is");}
else {
do
{
y=a+b;
if(x==y)
{ System.out.println("yes it is");
i=0;}
else if(x>y)
{a=b;
b=y;}
else
{ i=0;
System.out.println("no it is not");}
}while(i!=0);
}
}
}
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What is use of integral promotions in c?
What is a void * in c?
Explain what is the use of a semicolon (;) at the end of every program statement?
How can I invoke another program or command and trap its output?
Explain the Difference between the New and Malloc keyword.
How do I copy files?
Is null equal to 0 in sql?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
What is the difference between abs() and fabs() functions?
Why doesnt long int work?
What is self-referential structure in c programming?
What is a lvalue
What are the advantages of c preprocessor?
What is extern c used for?