0% found this document useful (0 votes)
21 views2 pages

Programming Sheet1

The document contains 10 programming problems related to concepts like discounts, taxes, series, prime numbers, palindromes, and more. The problems involve writing programs to input data, perform calculations based on conditions, and output results. Complexity ranges from basic to more advanced problems using concepts like switch statements, menus, and nested if/else.

Uploaded by

atharvtripathi6a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

Programming Sheet1

The document contains 10 programming problems related to concepts like discounts, taxes, series, prime numbers, palindromes, and more. The problems involve writing programs to input data, perform calculations based on conditions, and output results. Complexity ranges from basic to more advanced problems using concepts like switch statements, menus, and nested if/else.

Uploaded by

atharvtripathi6a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

U.P.

Kirana Seva Samit Vidyalaya


Class IX
1)Write a Program to input name and amount of ticket for the customers. A discount on Ticket as follows:-
Ticket Amount Discount
Above 70000 18 %
55001 to 70000 16%
25001 to 35000 10%
<=25000 2%
Calculate Discount and net Amount to be paid .Display output in the following format:
Name Ticket Charges Discount Amount

2)The Water Department has decided the rate policy based on water consumption as follows:

Water Consumed (in Gallons) Tax Rate


More than 45 but 75 or less 475.00
More than 75 but 125 or less 750.00
More than 125 but 200 or less 1225.00
More than 200 but 350 or less 1650.00
More than 350 2000.00
Write a program to input water consumed for n consumers and display their water tax.
3)Write a program to input age ,gender and taxable income of person. The tax is applicable if age is less
than or equal to 65 Display income tax as per the following table.
Taxable income Income Tax
Less than 1.60 lakh nil
Greater than 1.60 lakh and less than 5 lakh 10% of more than 1.60 lakh
Greater than 1.60 lakh and less than 5 lakh 34000+20% of more than 5 lakh
Greater than 8 lakh 94000+30% of more than 8 lakh
4)Using switch statement write a menu driven program to:-
1:To find out and display all the factors of a number input by user(including 1 and excluding number itself)
Sample input(n=15)
Sample output(1,3,5)
2:To find and display factorial of a number input by a user(factorial of a non negative integer denoted by
N! is the product of all the integers less than or equal to n
Sample input n=5
Sample output 5!=5*4*3*2*1
For incorrect choice ,appropriate message should be displayed.

5.Using switch statement write a menu driven program to:-


1:Generate and display the first 20 terms of Fibonacci series
2:To find the sum of integers input by the user.
Sample input:125
Sample output 8
For incorrect choice ,appropriate message should be displayed.

6;Write a menu driven program to accept a number and check and display whether it is
1:A prime number(A number divisible by 1 and itself and not by any other number)
2:Automorphic number(A number which contain number in the last digit of its square)
7)Write a program to generate a triangle or an inverted triangle till n term based upon their user choice
Of triangle to be displayed input 1 for a triangle 2 for the inverted triangle

8:Write a menu driven class to accept a number from user and check whether it is palindrome or perfect number.
1:Palindrome number(A number is a palindrome number when which is read in reverse order is same as
The right order)
2:perfect number(A number is called perfect number if it is equal to the sum of its factors other than the number
itself)6=1+2+3
9:Using switch statement,write a menu driven program for the following
I) I
IC
ICS
ICSE
II)ICSE
ICS
IC
I
10:An electronic shop has announced the following seasonal discounts on the purchase of certain items
Purchase amount Discount on laptop Discount on pC
0-25000 0.0% 5.0%
25001-57000 5.0% 7.5%
57001-100000 7.5% 10.0%
More than 100000 10.0% 15.0%
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/100)*purchase amount
Net amount=amount of purchase-discount.

You might also like