Ingeniero De Php Interview Questions

4,498 ingeniero de php interview questions shared by candidates

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 )
avatar

PHP Developer

Interviewed at LiteBreeze

4.6
Mar 6, 2019

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 )

Viewing 41 - 50 interview questions

Glassdoor has 4,498 interview questions and reports from Ingeniero de php interviews. Prepare for your interview. Get hired. Love your job.