Page 194 - CA_Blue( J )_Class9
P. 194

j.   Write a program to input the annual taxable income and compute the tax according to the given conditions.
                                    Total Annual Taxable Income                        Tax Rate
                              Up to Rs. 1,00,000                   No tax
                              From 1,00,001 to 1,50,000            10% of the income exceeding Rs. 1,00,000
                              From 1,50,001 to 2,50,000            Rs. 5000 + 20% of the income exceeding Rs. 1,50,000
                              Above Rs. 2,50,000                   Rs. 25,000 + 30% of the income exceeding Rs. 2,50,000.
                         k.  Using if-else, input a character and print the character is a vowel or a consonants.
                     2.   Programs Using Multiple Branching statement
                         a.  Write a menu-driven program, to input the radius(r), height (h) and calculate the following:
                            i.  Volume of sphere (vs) = 4/3πr3
                            ii.  Volume of cylinder (vc) = πr2h
                            iii.  Volume of cone (vco) = πr h/3
                                                   2
                         b.   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.
                         c.    Write a menu-driven class to accept a number from the user and check whether it is a prime or find a factorial of
                           the number.
                            i.  prime number: a number is a prime number if the number is divisible by 1 and that number only.
                            ii.  Factorial of the number: the word factorial means product of all the number up to that number.
                         d.  Using switch case, write a program to display the results of the following evaluations based on the user’s choice.
                            i.   Square root of 9
                            ii.   Absolute value of 126.4
                            iii.  Print the smallest integer value greater than the 56.7
                            iv.   Print any value between 0 and 1
                         e.  Write a program to input a choice and print the following using if-else:
                            i.  Area of a rectangle
                            ii.  Area of a square
                            iii.  Area of a circle








































                   192    Touchpad Computer Applications-IX
   189   190   191   192   193   194   195   196   197   198   199