Programming Challenge 4: Birthday Party

Tomorrow is Angkon’s birthday. Angkon wants to arrange a birthday party. Angkon wants to invite most of his friends in that party. But Angkon does not know calculation very well. So he has come to you to make him a cost calculator. You are very good in programming. So you have agreed to solve his problem. Angkon gives you some conditions: 
  1. If Angkon invites less than or equal 8 people then the size of the cake will be 8 inch. For more than 8 people size of the cake will be 20 inch. 
  2. Price of 8 inch cake is 150 Taka and the price of 20 inch cake is 250 Taka. [ Taka is the Bangladeshi Currency ] 
  3. You can write 16 characters on 8 inch cake and 40 characters on 20 inch cake. 
  4. Each character on cake will cost 0.25 Taka. 
  5. It will cost 25 taka per person to entertain them with foods, drinks etc. 
Now your job is to write a program to calculate how much money Angkon has to pay. In your program you will take input the number of people and the text written on the cake. And the output will be the amount of the cost.

0 comments :

Post a Comment

Spam comments will be deleted. :)

 
Loading...
TOP