Skip to main content

PRACTICE QUESTIONS SET 8


LIST OF PROGRAMS



repare an interactive program to input the basic salary of 15 persons. Each one of them gets 25%of the basic as house rent allowance (HRA). 15% of basic as Conveyance allowance and 10% as entertainment allowance the total salary calculated by adding basic + HRA + conveyance and entertainment allowance Calculate how many out of  15 Got salary above Rs. 3000/= and also print the total salary of each person.
158.    The present population of a country is P and it increases by 5% every year. The population (P) after n years is given by a formula P=P* (1.05)n. WAP lo find the population every year, for the next 10 years.
l59.     Pooja cottage industries have 75 employees. WAP to input each employee's name, grade and basic pay. Wages are then calculated according to the grade. All percentages are on Basic Pay
Grade A: employee receives HRA is 30%, Medical is 20% and deducts Income tax 25% of basic.
Grad B: employee receives HRA is 25%, Medical is 15% and deducts Income tax 20%) of basic.
Grade C: employee receives HRA is 20%. Medical is 15% and deducts Income tax 10% of basic.
Total Salary is calculated as Basic + HRA i Medical    Income Tax
160.    WAP to calculate the fare for the passengers traveling on a computerized bus. As a passenger centers the bus the computer displays “what distance will you travel?” on entering the distance the fare is printed put according to the following table:
Distance
Fare
Upto I5KM
Rs. 5
Upto25KM
Rs. 10
Upto 25 KM
Rs. 15

The Computer keeps on adding and displaying the total fare after each passenger has entered. The program ends when the distance is entered as “( )” it than prints the total number of passenger who entered the bus and the total fare collected.
161.    CISC Ltd revises its rate of interest for the public deposits as follows
Year
Cumulative Interest Scheme
Annual Income Scheme

Compounded Annually
Compounded Annually
1
----
11%
2
----
11.5%
3
12.5%
12%
4
12.5%
12%
5
12.5%
12%

Deposit under the emulative scheme is accepted for a period between 3 to 5 years only.
WAP to find the
a)         Amount (A) due for sum (P) invested under the cumulative option scheme, by using the formula A  P x [1+r/100]2
b)        Interest (I) for each year under the annual Interest scheme, using the formula I=.01 x P x r 
162.    The Production P crude oil of a country in millions of barrels may be estimated by the following set of equations, where t represents the time in years.
P= 5 + 3t, 0<=t<-3  
p= 14 +( t-5/2)2 for t>3      
Write a program to find the quantity of production for every year from t = I to 10.
163.    The acceleration due to gravity as a function of altitude is given by:
g=32.17 (4390/(43 90+h))2 if  h>0
g=32. 17(1 + (h/4390)) if h<=0
Where h is the height above the sea level in miles and g is the acceleration due to gravity in ft. per sec2. WAP to print out the values of g where h range from -4 to 10.
164.    A computerized ticket counter for bumping cars at Appu Ghar Charges for each ride at the following rate:
Age
Amount per head
15 or above
Rs. 8
4 or above but below 15
Rs. 5
Accompanying kids below 4
Rs. 2
WAP, which takes as input the number of people of various age groups and prints its ticket. At the end of the day the program states the number people of different age groups who took the ride and the total amount receives as collection of fares.
165.    WAP to print the month name of the corresponding month number entered by the user, To stop the program 0 should be entered for the month number. 



Comments

Popular posts from this blog

unix commands