ICSE computer practical sample paper 5
Sample Input (1) : London, Sample Output (1) : ONDONLAY
ICSE computer practical sample paper
Array program
- Write
a program that encodes a word into Piglatin. To translate word into piglatin
word, convert the word into uppercase and then place the first vowel of the
original word as the start of the new word along with the remaining alphabets.
The alphabets present before the vowel being shifted towards the end followed
by “AY”.
Sample
Input (1) : London, Sample Output (1) : ONDONLAY
Sample Input (2) : Olympics, Sample Output (1) : OLYMPICSAY
ICSE computer practical sample paper
2. Using switch statement write a menu driven program:
- To check and display whether a
number input by the user is a composite number or not ( A number is said to be composite, if
it has one or more than one factor excluding 1 and the number itself). Example
4, 6, 8,9….. - To find the smallest digit of an integer
that is input.
Sample
input : 6524
Sample
output : Smallest digit is 2
For an incorrect choice, an appropriate error should be displayed.
ICSE computer practical sample paper
3. Design a program to create an array of integers, size should be entered by the user(between 5 to 20). And sort the array in ascending order. with any sorting technique [Bubble sort or selection sort]
Example 1:
INPUT
Enter
number between 5 to 20
5
Enter
numbers
23,
4, 58,32, 100
OUTPUT:
Array
before sorting
23,
4, 58, 32, 100
Array after
sorting
4,23,32,58,100
Example 2:
INPUT
Enter
number between 5 to 20
32
OUTPUT:
Invalid Input.
4. Write a program to make a pattern
*
* *
* * *
* * *
*
* * * * *
* * * *
* * *
* *
*
ICSE computer practical sample paper
Watch JAVA videos
Related Posts
Continue learning with these related articles
Sum of First n Natural Numbers in Java (Loop and Formula)
Find the sum of the first n natural numbers in Java with a for loop, a while loop and the formula n(n + 1)/2, with a dry run and the sums of even numbers, odd numbers, squares and cubes.
Prime Number Program in Java: Check a Number and Print Primes in a Range
Check whether a number is prime in Java by counting its factors, a faster square-root method with isPrime(), and a program that prints all prime numbers in a range.

Encapsulation, Access Specifiers and Scope of Variables in Java for ICSE Class 10
ICSE Class 10 Computer Applications notes on encapsulation: private, default, protected and public access, data hiding with getter and setter methods, instance vs static (class) variables, local variables and scope, with a solved BankAccount program.