Class 9icese
Class 9icese
SECTION B
(ATTEMPT ANY 4)
Question 3
Using a switch statement, write a menu driven program to convert a given
temperature from Fahrenheit to Celsius and vice versa. For an incorrect
choice, an appropriate error message should be displayed.(HINT : C
=5/4×CF − 32 ) and F = 1.8 × C + 32 [10]
Question 4
A cloth showroom has announced the following festival discounts on the
purchase of items, based on the total cost of the items purchased: [10]
Total cost Discount(%)
Less than 1000 No discount
1001 to 2999 10%
3000 to 4999 15%
More than 5000 30%
Question 5
Write a program to input an integer and check whether it is a magic number
or not. A Magic number is such a number whose continous sum of the digits
until it forms a single digit is 1. For example [55]=5+5=[10]=1+0=[1] ,
therefore 55 is a Magic Number. (Remember no loops is to be used). [10]
Question 5
A gameshop charges ps5. Following are the charges:
First five days : 2500rs/day.
Six to Ten days : 3500rs/day.
Ten to fifteen days: 4500rs
Above fifteen days : 6000 rs/day. Design a program to calculate the charges
assuming that a ps5 will be returned after N days. [10]
Question 6
Find the sum of the series.
S = (X+1)2+(X+2)3+(X+3)4+(X+4)5+…………… +(X+N)N+1 [10]
Question 7
Write a program to pass an integer as argument and check whether it is
Armstrong number or not. Numbers whose sum of the cube of its digit is
equal to the number itself is called Armstrong numbers. Example 153 =13
+53 +33 . [10]