Results 1 to 2 of 2
Thread: Can't find symbol for user input
- 10-18-2012, 07:07 AM #1
Member
- Join Date
- Oct 2012
- Posts
- 7
- Rep Power
- 0
Can't find symbol for user input
It worked earlier, but I don't know what i did to make it not work o-O
Check my code as well?.gif)
Java Code:import java.util.*; public class PP { public static void main (String[] args) { Scanner myInput = new Scanner(System.in); System.out.print("Input an integer number: "); N = myInput.nextInt(); System.out.println("The prime palindrome numbers are \n"); myPrint(N); } public static void myPrint(int numPP){ int count = 0; if(is_prime(N) && is_palindrome(N)){ count++; }else System.out.println("There are no prime palindrome integer numbers"); } public static boolean is_prime(int N){ if (N < 4){ return true; } for (int i = 2; i <= N / 2; i++) { if (N % i == 0) { return false; } } return true; } public static boolean is_palindrome(int N){ int result = 0; while (N != 0){ int rem = N%10; N = N/10; result = result*10+rem; } return true; } }Last edited by nonny; 10-18-2012 at 08:30 AM.
- 10-18-2012, 09:38 AM #2
Member
- Join Date
- Sep 2012
- Posts
- 34
- Rep Power
- 0
Similar Threads
-
Cannot find symbol
By TripleZigZag in forum New To JavaReplies: 4Last Post: 02-02-2011, 02:36 AM -
can't find symbol
By globo in forum New To JavaReplies: 21Last Post: 01-17-2011, 04:06 AM -
Still cannot find symbol!
By Johanis in forum New To JavaReplies: 1Last Post: 11-04-2010, 04:32 PM -
cannot find symbol symbol :constructor Error. Please help! =(
By KalEl in forum New To JavaReplies: 9Last Post: 10-18-2008, 08:26 PM -
cannot find symbol symbol : class Item location: package platypos.services.order
By officialhopsof in forum New To JavaReplies: 3Last Post: 05-01-2008, 08:30 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks