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
Differentiate between null and void pointers.
What’s a signal? Explain what do I use signals for?
What is character constants?
Why main function is special give two reasons?
What is difference between structure and union in c?
What is a function simple definition?
Do you know the purpose of 'register' keyword?
What are the two forms of #include directive?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
c program for searching a student details among 10 student details
Sir i need notes for structure,functions,pointers in c language can you help me please
What is the difference between functions abs() and fabs()?
What is a program flowchart and how does it help in writing a program?
How can I delete a file?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.