0% found this document useful (0 votes)
71 views

Computer Practice Questions Icse Java

This document contains 10 programming problems covering topics like generating series, finding factors and factorials using switch case, array operations like finding max, min, sum, linear search, counting character types in a string, and case conversion of a string. The problems involve writing programs in Java to perform various calculations and string/array manipulations based on user input.

Uploaded by

Samiksha Chettri
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Computer Practice Questions Icse Java

This document contains 10 programming problems covering topics like generating series, finding factors and factorials using switch case, array operations like finding max, min, sum, linear search, counting character types in a string, and case conversion of a string. The problems involve writing programs in Java to perform various calculations and string/array manipulations based on user input.

Uploaded by

Samiksha Chettri
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

INTERNAL ASSESSMENT – 2022

CLASS - X

1. WAP to compute the billing operations of a telephone company “CONNECTION”. The


bill has to be generated as follows:

No. of calls Charges


First 250 No charge
Next 100 1.20 per call
Next 150 1.50 per call
Excess 1.75 per call

A rent of ₹ 375 is charged as well as a tax of 15% on the total bill for each customer.
Compute the bill.

2. Write a program in Java to enter a number and check whether the number is an
Armstrong number or not.
(A number is said to be Armstrong if the sum of the cubes of its digits is equal to the
original number)
Sample input: 153
Sample output : 153 is an Armstrong number because 13+53+33=153

3. Write a program to display the first ten terms of the following series:
a. 1, 11, 111, 1111,……
b. 0, 3, 8, 15,……..

4. Write the programs to find the sum of the following series:


s = (a+1) + (a+2) + (a+3) + ………..+ (a+n)

5. Write a program to generate a triangle or an inverted triangle till n terms based upon the
user’s choice.

Example 1 Example 2
Input: Type 1 for a triangle and Type 2 for Input: Type 1 for a triangle and Type 2 for
inverted triangle inverted triangle
Enter your choice: 1 Enter your choice: 2
Enter the number of terms 5 Enter the number of terms 6
Sample output: Sample output:

1 666666
22 55555
333 4444
4444 333
55555 22
1
6. Using switch case statement, write a menu driven program to:
a. Find and display all the factors of a number input by the user (including 1 and
excluding the number itself).
Example: Sample input : n = 15
Sample output : 1, 3, 5
b. Find and display the factorial of a number input by the user (the factorial of a non-
negative integer n, denoted by n!, is the product of all integers less than or equal
to n.
Example: Sample input :n=5
Sample output : 5! = 1*2*3*4*5 = 120

7. WAP to input integer elements into an array of size 20 and perform the following
operations. Display –
a. The largest no.
b. The smallest no.
c. Sum of all the elements.

8. WAP to accept 20 different numbers in a SDA. Now, enter a number and search whether
the number is present or not in the list of array by using the ‘Linear Search’ technique.

9. WAP to enter a sentence and print the number of –


i. Uppercase Characters
ii. Lowercase Characters
iii. Digits
iv. Special Characters

10. WAP to enter a sentence in mixed case and print a new string after converting upper to
lower and lower to upper case.

You might also like