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
What are dangling pointers? How are dangling pointers different from memory leaks?
What are the properties of union in c?
what do you mean by inline function in C?
what is the different bitween abap and abap-hr?
What is difference between arrays and pointers?
Write a program to identify if a given binary tree is balanced or not.
write a programming in c to find the sum of all elements in an array through function.
When the macros gets expanded?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
if p is a string contained in a string?
What is the purpose of main( ) in c language?
What does calloc stand for?
Explain the red-black trees?
What is the difference between Printf(..) and sprint(...) ?