The Programming Project: Integer to String
Showing posts with label Integer to String. Show all posts
Showing posts with label Integer to String. Show all posts

Tuesday, April 15, 2014

ISC Computer Science Practicals, 2012


/* A prime palindrome integer is a positive integer (without leading zeros) which is prime as well as a palindrome.
Given two positive integers m and n, where m < n, write a program to determine how many prime-palindrome integers
are there in the range between m and n (both inclusive) and output them.
The input contains two positive integers m and n where m < 3000 and n < 3000.
Display the number of prime palindrome integers in the specified range along with their values in the format specified below:

Test your program with the sample data and some random data:

Example 1:
INPUT: m=100
N=1000

OUTPUT: The prime palindrome integers are:
101,131,151,181,191,313,351,373,383,727,757,787,797,919,929
Frequency of prime palindrome integers: 15

Example 2:
M=100
N=5000

OUTPUT: Out of range */

/* ISC COMPUTER SCIENCE PRACTICALS,2012 Solved */

CODE


Tags: ISC, Computer Science, Practicals, 2012, Prime, String.valueOf(), Palindrome, Integer to String, Prime Palindrome