0 ratings0% found this document useful (0 votes) 317 views4 pagesISC 2015 Computer Science Paper 2 Practical
get all your doubts cleared about ISC 2015 comp practical
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
COMPUTER SCIENCE
Year
tin re AGE
Paper.com (PRACTICAL) Paper.com
(Reading Time: 15 minutes)
(Planning Session AND Examination Session: Three Hours)
‘The total time to be spent on the Planning and the Examination Session is Three hours.
After completing the Planning Session, the candidate may begin with the Examination Session,
A maximum of 90 minutes is permitted to begin the Examination Session.
However, if candidates finish earlier, they are 10 be permitted to begin the Examination Session.
(Maximum Marks: 80)
As itisa practical examination the candidate is expected to do the following:
1, Write an algorithm for the selected problem [10]
(Algorithm should be expressed clearly using any standard scheme such as pseudo
code or in steps which are simple enouigh to be obviously computable.)
2. White a program in JAVA language. The program should follow the algorithm and (20)
should be logically and syntactically comect
3. Document the program using mnemonic names / comments, identifying and clearly [10]
describing the choice of data types and meaning of variables.
4. Code / Type the program on the computer and get a printout (hard copy). Typically, [10]
this should be a program that compiles and runs correctly.
5, Testnan the program on the computer using the given sample data and get a printout [10],
of the output in the format specified in the problem.
6. Viva-Voce on the Selected
em. 20)
‘This Paper consists of 4 printed pages.
1215.868B ‘Turn overYears
uestion
Paper.com Solve any one of the following Problems:
Question 1
Given two positive numbers M and N, such that M is between 100 and 10000 and N is less
than 100, Find the smallest integer that is greater than M and whose digits add up to N. For
example, if M = 100 and N = 11, then the smallest integer greater than 100 whose digits add
upto His 19
Write a program to accept the numbers M and N ftom the user and print the smallest required
number whose sum of all its digits is equal to N. Also, print the total mmber of digits present
in the required number, The program should check for the validity of the inputs and display an
appropriate message for an invalid input
‘Test your program with the sample data and some random data
Example 1
INPUT: M= 100
n
oUuTPuT: ‘The required number
‘Total mumber of digits =3
Example 2
INPUT: M
25
OUTPUT: ‘The required number= 1699
‘Total number of digits = 4
Example 3
INPUT: M=99
Neu
ouTPuT: INVALID INPUT
Example 4
INPUT: M=112
N=130
OUTPUT: INVALID INPUT
Years
uestion
Paper.com
1218-868 BYear
‘Ouestion
Question 2 Paper.com
Write a program to declare a square matrix A[ ][ ] of order MxM where 'M! is. the
number of rows and the number of columns, such that M must be greater than 2 and
less than I 0, Accept the value of M_as user input Display an appropriate message for
an invalid imput, Allow the user to input integers info this matrix. Perform the
following tasks:
(@) Display the original matrix.
(©) Rotate the matrix 90° clockwise as shown below:
Original matrix Rotated matrix
123 744
456 852
789 963
(©) Find the sum of the elements of the four comers ofthe matrix:
‘Test your program with the sample data and some random data:
Example 1
INPUT: = M=3
304 9
25 8
1 6 7
ourpur:
ORIGINAL MATRIX
304 9
25 8
1 6 7
MATRIX AFTER ROTATION
10203
6 5 4
7 8 9
‘Sum of the corner elements = 20
Example 2
INPUT: = M=4
1 204 9
2 5 8 3
16 7 4
397 6 8
ourpur:
ORIGINAL MATRIX
1204 «9
2 5 8 3
16 7 4 Years
a 7 6 8 juestion
Paper.com
1215.868B ‘Turn over