20)Write a program to read time in hours and displays following message.
0 to 12 Good morning
12 to 18 Good evening
18 to 24 Good night
click to see solution
21)calculate roots of quadratic equation (ax2+bx+c). Conditions to be taken into account are
(b2-4ac)>0 and 2a>0
click to see solution
22)Write a program to add two times.
e.g.
2:50:20+2:40:12=5:30:32
click to see program
23)Nepal telecom calculates the bill according to following rule.
minimum charge is Rs. 100 for 100 calls.
if calls exceed 100 then charge is Rs. 1/call is added with 10% tax and 13% vat cumulatively on total amount. Write a 'C' program for this.
Click to see solution
24)The minimum charge for Nepal Electricity authority is Rs. 80 for 20 units consumed. If a person consumes more than that then s/he has to pay Rs. 7.25 per unit extra up to 100. If the person consumes more than 100 units then he has to pay 9.50 per unit. Write a 'C' program to calculate bill.
Click to see program
25)Income tax is calculated on annual income according to following rules.
salary married unmarried
up to 100000 0% 0%
100000... 300000 5% 10%
above 300000 15% 20%
Click to see solution
26)Write a program to input number of passenger and destination through air.This program should print name,destination,number of passenger and total fare using following rate.
Destination Rate
Pokhara Rs. 2400
Bharaiwa Rs. 2500
Biratnagar Rs. 800
Bhadrapur Rs. 2550
Click to see solution
0 to 12 Good morning
12 to 18 Good evening
18 to 24 Good night
click to see solution
21)calculate roots of quadratic equation (ax2+bx+c). Conditions to be taken into account are
(b2-4ac)>0 and 2a>0
click to see solution
22)Write a program to add two times.
e.g.
2:50:20+2:40:12=5:30:32
click to see program
23)Nepal telecom calculates the bill according to following rule.
minimum charge is Rs. 100 for 100 calls.
if calls exceed 100 then charge is Rs. 1/call is added with 10% tax and 13% vat cumulatively on total amount. Write a 'C' program for this.
Click to see solution
24)The minimum charge for Nepal Electricity authority is Rs. 80 for 20 units consumed. If a person consumes more than that then s/he has to pay Rs. 7.25 per unit extra up to 100. If the person consumes more than 100 units then he has to pay 9.50 per unit. Write a 'C' program to calculate bill.
Click to see program
25)Income tax is calculated on annual income according to following rules.
salary married unmarried
up to 100000 0% 0%
100000... 300000 5% 10%
above 300000 15% 20%
Click to see solution
26)Write a program to input number of passenger and destination through air.This program should print name,destination,number of passenger and total fare using following rate.
Destination Rate
Pokhara Rs. 2400
Bharaiwa Rs. 2500
Biratnagar Rs. 800
Bhadrapur Rs. 2550
Click to see solution