Consider generating a monthly mobile bill for data usage. A basic charge of Rs. 200 allows for 20GB of data per month, with a daily cap of 2GB. The user has to pay Rs. 200 per month irrespective of the amount of data used. For each additional MB used above 2GB per day, the user is to pay an additional Rs. 0.025. Also, for each additional MB above 20GB for the whole month, the user needs to pay an additional Rs. 0.05. Assumption: 1GB = 1024MB Write a function that does the following: - Accepts an array containing daily usages in MB for a month - Calculate the total monthly bill for the input, including the additional charge for exceeding daily and monthly limits, if any. Sample Input/Output Input Data usage: date of month => data used in MB Array ( [2] => 3000 [5] => 1250 [10] => 2000 [12] => 300 [14] => 900 [16] => 4250 [18] => 2560 [19] => 1500 [22] => 190 [26] => 2020 [28] => 5050 ) Output Array ( [baseCharge] => Rs. 200 [dailyAdditional] => Rs. 166.7 [monthlyAdditional] => Rs. 127 [totalBill] => Rs. 493.7 )
Desarrollador De Software Php Interview Questions
4,366 desarrollador de software php interview questions shared by candidates
Sample streamed data Please write a program stream-sampler that receives and processes an input stream consisting of single characters.
how can you display 3rd highest salary from database? how can you handle errors in php? how to send a http request in php? In depth concepts of OOPS.
Core php,oops in php,joins in mysql &queries and logical short program setc
How will I increase security in a Contact form using PHP
General (but often rather theoretical) technical questions such as what's the difference between include and require. Coding algorithms such as the ones often used on Codility
difference between sleep and wakeup?
How to import OS in python
Swap The number without using third variable?
1. How does PHP work? 2. What are the common uses of PHP? 3. What is the use of "echo" in php? 4. How to include a file to a php page?
Viewing 41 - 50 interview questions