Class X Programming Assignment (2025 – 26):
Instructions:
• Each question should have the following pages in the sequence mentioned below:
✓ Question followed by Program Description in the same page (starting from a
new page)
✓ Program (starting from a new page)
✓ Variable Description Table[Variable Name, Data Type, Description] (starting
from a new page)
✓ Output (starting from a new page)
• Neat and clean assignment should be submitted, in proper format.
Question 1
Write a program in Java to declare an array of size twenty of double data type. Accept the
elements into the array and perform the following:
• Calculate and print the product of all the elements
• Print the square of each element
Question 2
Write a program in Java to accept name and total marks of N number of students in two
single subscript arrays name[] and totalmarks[]. Calculate and print:
a) The average of the total marks obtained by N number of students
[average=(sum of total marks of all students)/ N]
b) Deviation of each student’s total marks with the average
[deviation=total marks of a student – average]
Question 3
The International Standard Book Number (ISBN) is an unique numeric code or book
identifier which is printed on every book. The ISBN is based upon a ten digit code. ISBN is
legal if:
(1 x digit 1 + 2 x digit 2 + 3 x digit 3 + …… + 10 x digit 10) is divisible by 11.
For example, 1401601499
Sum=1x1 + 2x4 + 3x0 + 4x1 + 5x6 + 6x0 + 7x1 + 8x4 + 9x9 + 10x9=253, is divisible by 11.
Write a program to input ISBN code, as a ten digit number. If ISBN is not a ten digit number
dsiplay a message, “Illegal ISBN”; and terminate the program. If the number is ten digit,
extract the digit and compute the sum as mentioned above. If the sum is divisible by 11
display the message “Legal ISBN”, if the sum is not divisible by 11 display the message
“Illegal ISBN”.
Question 4
Write a program to accept roll numbers and marks secured in Computer Applications of 40
students in a Single Dimensional Array. Sort the marks in descending order using bubble
sort technique. Finally, display the roll number and marks of each student in a sorted
order.
Question 5
Write a program to accept employee code number, and basic salaries of ‘n’ employees and
arrange them in a descending order using selection sort technique and display in the
following format:
Employee Code Basic Salary Allowance
>80000 30%
>50000 , <=80000 25%
>30000 , <=50000 18%
<=30000 10%
Question 6
Write a program to input a set of any 10 integers. Find their sum and product. Join their
sum and product into a single number and display the concatenated number .
Example: Let sum be 245, and product be 1346.
Therefore, number after conjoining them = 2451346
Question 7
Write a program to generate uppercase letters from Z to A and lowercase letters from a to
z, as per user’s choice. They must enter 1 to display uppercase letters from Z to A and 2 to
display lowercase letters from a to z.
Question 8
Question 9
Question 10
Question 11
Question 12
Question 13
Question 14
Question 15
Question 16
Question 17