0% found this document useful (0 votes)
155 views2 pages

Isc Practical 2025

Uploaded by

saritbose26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views2 pages

Isc Practical 2025

Uploaded by

saritbose26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SET 1

QUESTION 1:

A number you say to be a goldbach number, if the number can be expressed as the addition of two
odd prime number pair. If we follow the above condition then we can find that every even number
larger than 4 is a goldbach number because it must have any pair of odd number pairs.

Example 6 = 3, 3 (one pair of odd prime)

10 =3, 7 and 5, 5 (two pair of odd prime)

write a program to enter any positive even natural number ‘N’ where (1 <= n <= 50) and generate
prime twin of ‘N’

Test your program for the following data and some random data

Example 1

Input: n= 14

Output: odd prime pairs are: 3, 11

7, 7

Example 2

Input: n= 20

Output: odd prime pairs are: 17, 3

13, 7

Example 3

Input: n= 44

Output: odd prime numbers are: 41, 3

37, 7

31, 13

Example 4

Input: n= 25

Output: invalid input


SET 2
QUESTION 2:

A unique digit integer is opposite integer (without leading 0) with no duplicate digit. For example 7,
135, 214 are all unique digit integers where as 33, 3121, 300 are not

Given two positive integers m and n, where m<n.

Write a program to determine how many unique digit integers are there in the range between m and
in (both inclusive) and output them.

The input contains two positive integers m and n. Assume m<30000 and n<30000. You are to output
the number of the unique digit integer in the specified range along with their values in the format
specified below:

Test your program for the following data and some random data

Example 1:

Input: m= 100

n= 120

Output: the unique digit integers are:

102, 103, 104, 105, 106, 107, 108, 109, 120

frequency of unique digit is: 9

Example 2

Input: m= 2520

n= 2529

Output: the unique digit integers are:

2506, 2507, 2508, 2509, 2510, 2513, 2514, 2516, 2517, 2518, 2519

frequency of unique digit is: 11

Example 3:

Input: m= 2505

n= 120

Output: the unique digit integers are: Nil

frequency of the unique is 0

You might also like