15,902,939 members

i have a beginner question on Java Fibonacci.

In this java program, The method should prints fibonnacci numbers sequence from beginIndex to LastIndex, so it should print "Hi" (instead of number) if the number is multiples of 5, print "I am" if the number is multiples of 7 and print "Hi I am me" if the number is multiples of 7 and 5. I am not really sure on how to do this. Thank you for any help.

**What I have tried:**

I have tried the fibonacci sequence, but im not really sure how to replace the numbers with strings.

In this java program, The method should prints fibonnacci numbers sequence from beginIndex to LastIndex, so it should print "Hi" (instead of number) if the number is multiples of 5, print "I am" if the number is multiples of 7 and print "Hi I am me" if the number is multiples of 7 and 5. I am not really sure on how to do this. Thank you for any help.

Java

class FibonacciClass { public static void main(String args[] ) throws Exception { generatefibonacci(10, 20); generatefibonacci(0, 1); } private static void generatefibonacci(int BeginIndex, int LastIndex) { }

I have tried the fibonacci sequence, but im not really sure how to replace the numbers with strings.

Comments

Patrice T
19-Aug-16 13:47pm

You have done nothing. try to work and come back if you are stuck.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject,
20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8
+1 (416) 849-8900