ASM_13606

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

PURWANCHAL VIDYAMANDIR

COMPUTER APPLICATIONS ASSIGNMENT 2024-2025


Final Term
CLASS – IX

INSTRUCTIONS:

EACH ASSIGNMENT MUST CONTAIN VARIABLE LISTING, CLASS LISTING,


METHOD LISTING, ALGORITHM, MAIN METHOD AND COMMENT LINE.

THE ORDER OF EACH ASSIGNMENT: (MUST BE)


1. PROGRAM DESCRIPTION ( QUESTION )
2. ALGORITHM
3. SOURCE CODE ( MUST BE PRINTOUT )
4. VARIABLE LISTING , CLASS LISTING , METHOD LISTING
5. OUTPUT (MUST BE PRINTOUT).

The 1st page start with INDEX PAGE


INDEX PAGE CONTAINS THE FOLLOWING COLUMNS:

1. ASSIGNMENT NUMBER ( QUESTION NO)


2. PROGRAM NAME
3. DATE
4. REMARK

ASSIGNMENT QUESTION:--
6. Write a program to accept a four-digit number and check if it is a USHWA number or not. The number is said
to be USHWA If: Sum of all digits= 2× ( sum of first and last)
Example: n =1234 Sum of first and last = 1+4=5 Sum of all digits =1+2+3+4=10,
Output : 1234 is an USHWA number.
7. Write a program to input three integers and check whether it forms a Pythagorean triplet or not. A set of three
integers is said to be a Pythagorean triplet if the sum of the squares of any two integers is equal to square of the
third integer. Example, (3, 4, 5), (5, 12, 13), and (7, 24, 25).
8. Write a program to input an integer and check whether it is a three-digit number or not. If it is then print the
largest digit in the number. Example INPUT: Enter an integer: 481 OUTPUT: Largest digit: 8
9. Write a program to input 10 integers and display the largest as well as the smallest integer.
10. Write programs to find the sum of the series:
s= 1-1/2+1/3-1/4+1/5-…-1/10
11. Write a program to input an integer and check whether it is perfect, abundant or deficient number. If the sum
of the factors excluding itself is equal to that number it is perfect, if greater than that number it is abundant and if
less than that number it is deficient number.
12. Write a program to input two integers and check whether it forms an amicable pair or not. An amicable pair
is such that the sum of the factors excluding itself of one number is the other number and sum of the factors
excluding itself of the other number is this number.
Example, (220, 284). Since sum of factors excluding itself of:
220= 1+2+4+5+10+11+20+22+ 44+55+110=284
284= 1+ 2+4+71+142=220
13. Write a program to input an integer and remove all the even digits from it.
For Example, INPUT: Enter an integer: 1234
OUPUT: 13
14. Write a program to input a number more than one digit. Find the highest and lowest digit of the number, then
find their Least Common Multiple (LCM).
For Example, INPUT: Enter a number: 48276 OUTPUT: LCM = 8
15. Write a menu-driven program to accept a number from the user and check whether it is ‘BUZZ’ number or to
accept any two numbers and print the ‘GCD’ of them.
i) A BUZZ number is the number which either ends with 7 or divisible by 7.
ii) GCD (Greatest Common Divisor) of two integers is calculated by continued division method. Divide the
larger number by the smaller; the remainder then divides the previous divisor. The process is repeated till the
remainder is zero. The divisor then results the GCD.
16. Write a program to find the sum of the following series:
S=1+(1+2) + (1+2+3) + (1+2+3+4) + (1+2+3+4+5) +…+(1+2+3+4+…+10)
17. Write a program to display the following pattern:
12345
2345
345
45
5
18. Write a program to calculate and display the sum of all odd numbers and even numbers between a range of
numbers from m to n (both inclusive) where m<n. Input m and n (where m<n)
19. Write a program to display the following pattern:
A
AB
ABC
ABCD
ABC
AB
A
20. Write a program to display the following pattern : ( Input: Number of lines 5)
*
***
*****
***
*
Assignment Number Date
Question 6 5.11.2024
Question 7 7. 11.2024
Question 8 12.11. 2024
Question 9 13.11.2024
Question 10 19. 11.2024
Question 11 21.11.2024
Question 12 26.11.2024
Question 13 28.11.2024
Question 14 3.12.2024
Question 15 5. 12.2024
Question 16 10.12.2024
Question 17 12.12.2024
Question 18 7.01.2025
Question 19 9.01.2025
Question 20 14. 01.2025

Submission Date: 21.01.25

You might also like