File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes help me correct my program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "help me correct my program" Watch "help me correct my program" New topic
Author

help me correct my program

kiran kumar reddy
Ranch Hand

Joined: Jun 28, 2012
Posts: 94

i am trying to get a program which prints true or false....to find out the given number is prime number and Fibonacci series.. below is my code which is not giving the output as expecting

Ankit Dan
Ranch Hand

Joined: Aug 31, 2012
Posts: 47

....use the code tag please
and please tell us what is the output you are getting..
kiran kumar reddy
Ranch Hand

Joined: Jun 28, 2012
Posts: 94

Ankit Dan wrote: ....use the code tag please
and please tell us what is the output you are getting..

out put is depending on input we are giving. for every prime number and Fibonacci number it is saying true and some times "true" will be printed more than once.
and when it is not either prime or Fibonacci number it is not showing anything. i got Fibonacci and prime number programs separately and were running successfully but combining them and getting out put is making me stuck.
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi,

You can put this function check whether it is among the series or not...



Modify code according your need. and prime number is very easy you can get reference from any where.

Regards
Jatan
 
Consider Paul's rocket mass heater.
 
subject: help me correct my program
 
Similar Threads
please help
Big O Notation
Online Java Editor/Compiler?
doubt regarding finding prime number program
which break statement doulh I use