Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
Not able to understand error
sinatra roger
Ranch Hand
Posts: 160
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
import java.util.*; import java.math.*; public class D { static TreeMap <Integer,BigInteger> tm; public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("ENTER THE NUMBER TO CALCULATE CORRESPONDING PELL NUMBER"); tm = new TreeMap<Integer,BigInteger>(); int num = sc.nextInt(); //System.out.println(num); BigInteger res = pell(num); System.out.println(res); } public static BigInteger pell(int num) { if(num==0) { return BigInteger.ZERO; } if(num==1) { return BigInteger.ONE; } if((tm.get(num))==null) { tm.put(num,(pell(num-1).multiply(new BigInteger(String.valueOf(2)))).pell(num-2) ) ; return tm.get(num); } return tm.get(num); } }
I get the error symbol pell(int) not found. can anybody please tell what the mistake i have done is?
The next generation Mordern iSeries Developer
sinatra roger
Ranch Hand
Posts: 160
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
sorry got the error can somebody remove this..i dont think it will be useful
The next generation Mordern iSeries Developer
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Incompatible types
factorial
Project Euler problem 6 algorithm
Recursive method to print prime factorization of a number
return type of TreeMap
More...