Posts

Showing posts with the label ISC Practical

[Question 3] ISC 2016 Computer Practical Paper Solved – Words Beginning and Ending with Vowel.

Image
Question 3: Write a program to accept a sentence which may be terminated by either’.’, ‘?’or’!’ only. The words may be separated by more than one blank space and are in UPPER CASE. Perform the following tasks: (a) Find the number of words beginning and ending with a vowel. (b) Place the words which begin and end with a vowel at the beginning, followed by the remaining words as they occur in the sentence. Test your program with the sample data and some random data: Example 1 INPUT: ANAMIKA AND SUSAN ARE NEVER GOING TO QUARREL ANYMORE. OUTPUT: NUMBER OF WORDS BEGINNING AND ENDING WITH A VOWEL= 3 ANAMIKA ARE ANYMORE AND SUSAN NEVER GOING TO QUARREL Example 2 INPUT: YOU MUST AIM TO BE A BETTER PERSON TOMORROW THAN YOU ARE TODAY. OUTPUT: NUMBER OF WORDS BEGINNING AND ENDING WITH A VOWEL= 2 A ARE YOU MUST AIM TO BE BETTER PERSON TOMORROW THAN YOU TODAY Example 3 INPUT: LOOK BEFORE YOU LEAP. OUTPUT: NUMBER OF WORDS BEGINNING AND ENDING WITH A VOWEL= 0 LOOK...

[Question 2] ISC 2016 Computer Practical Paper Solved – Sorting Non-Boundary Matrix Elements

Image
Question 2: Write a program to declare a square matrix A[][] of order (M x M) where ‘M’ must be greater than 3 and less than 10. Allow the user to input positive integers into this matrix. Perform the following tasks on the matrix: (a) Sort the non-boundary elements in ascending order using any standard sorting technique and rearrange them in the matrix. (b) Calculate the sum of both the diagonals. (c) Display the original matrix, rearranged matrix and only the diagonal elements of the rearranged matrix with their sum. Example 1 INPUT : M = 4 9   2   1   5   8   13  8   4   15  6   3   11  7   12  23  8   OUTPUT: ORIGINAL MATRIX 9   2   1   5   8   13  8   4   15  6   3   11  7   12  23  ...

[Question 1] ISC 2016 Computer Practical Paper Solved – Circular Prime

Image
Question 1: A Circular Prime is a prime number that remains prime under cyclic shifts of its digits. When the leftmost digit is removed and replaced at the end of the remaining string of digits, the generated number is still prime. The process is repeated until the original number is reached again. A number is said to be prime if it has only two factors I and itself. Example: 131 311 113 Hence, 131 is a circular prime. Test your program with the sample data and some random data: Example 1 INPUT : N = 197 OUTPUT: 197 971 719 197 IS A CIRCULAR PRIME Example 2 INPUT : N = 1193 OUTPUT: 1193 1931 9311 3119 1193 IS A CIRCULAR PRIME Example 3 INPUT : N = 29 OUTPUT: 29 92 29 IS NOT A CIRCULAR PRIME SOURCE CODE import java.io.*; class ISC2016_CircularPrime {     boolean isPrime(int n)     {         int c=0;         for(int i=2;i<=n;i++)         { ...

[Question 3] ISC 2017 Computer Practical Paper Solved – Caesar Cipher.

Image
Question 3: Caesar Cipher  is an encryption technique which is implemented as ROT13 (‘rotate by 13 places’). It is a simple letter substitution cipher that replaces a letter with the letter 13 places after it in the alphabets, with the other characters remaining unchanged. Write a program to accept a plain text of length L, where L must be greater than 3 and less than 100. Encrypt the text if valid as per the Caesar Cipher. Test your program with the sample data and some random data: Example 1 INPUT :  Hello! How are you? OUTPUT :  The cipher text is: Uryyb? Ubj ner lbh? Example 2 INPUT :  Encryption helps to secure data. OUTPUT :  The cipher text is: Rapelcgvba urycf gb frpher qngn. Example 3 INPUT :  You OUTPUT :  INVALID LENGTH SOURCE CODE    import java.io.*; import java.util.*; public class ISC2017_CaesarCipher {     public static void main(String args[])     { ...

[Question 2] ISC 2017 Computer Practical Paper Solved – Quiz Result

Image
Question: The result of a quiz competition is to be prepared as follows: The quiz has five questions with four multiple choices (A, B, C, D), with each question carrying 1 mark for the correct answer. Design a program to accept the number of participants N such that N must be greater than 3 and less than 11. Create a double dimensional array of size (Nx5) to store the answers of each participant row-wise. Calculate the marks for each participant by matching the correct answer stored in a single dimensional array of size 5. Display the scores for each participant and also the participant(s) having the highest score. Example: If the value of N = 4, then the array would be: Note: Array entries are line fed (i.e. one entry per line) Test your program with the sample data and some random data: Example 1 INPUT :  N = 5 Participant 1 D A B C C Participant 2 A A D C B Participant 3 B A C D B Participant 4 D A D C B Participant 5 B C A D D Key: B C D A A OUTPUT...

[Question 1] ISC 2017 Computer Practical Paper Solved – Box Packing

Image
Question: A company manufactures packing cartons in four sizes, i.e. cartons to accommodate 6 boxes, 12 boxes, 24 boxes and 48 boxes. Design a program to accept the number of boxes to be packed (N) by the user (maximum up to 1000 boxes) and display the break-up of the cartons used in descending order of capacity (i.e. preference should be given to the highest capacity available, and if boxes left are less than 6, an extra carton of capacity 6 should be used.) Test your program with the sample data and some random data: Example 1 INPUT :  N = 726 OUTPUT : 48 x 15 = 720 6 x 1 = 6 Remaining boxes = 0 Total number of boxes = 726 Total number of cartons = 16 Example 2 INPUT :  N = 140 OUTPUT : 48 X 2 = 96 24 x 1 = 24 12 x 1 = 12 6 x 1 = 6 Remaining boxes 2 x 1 = 2 Total number of boxes = 140 Total number of cartons = 6 Example 3 INPUT :  N = 4296 OUTPUT :  INVALID LENGTH SOURCE CODE import java.io.*; import java.util.*; p...