ICSE (Class-X) Test-II
ICSE (Class-X) Test-II
Test-II
Full Marks: 50. Time: 1hr.
Page 1 of 2
2. 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.
(a) A BUZZ number is the number which either ends with 7 or divisible by 7.
(b) 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. 15
3. An electronics shop has announced the following seasonal discounts on the purchase of certain items.
Write a program based on the above criteria, to input name, address, amount of purchase and the type of
purchase (L for Laptop and D for Desktop) by a customer. Compute and print the net amount to be paid by a
customer along with his name and address.
(Hint: discount = (discount rate/100)* amount of purchase, Net amount = amount of purchase – discount) 15
Page 2 of 2