A boy wants to save money to buy a toy. He puts money in his piggy bank every day. Every day, he puts
1 rupee more than the previous day. Every sunday, he starts with a new value 1 rupee more than the
previous sunday. The cost of the toy is T rupees. The boy already has X rupees in his piggy bank. On the
first sunday, he puts Y rupees in his piggy bank. The values of T, X and Y are passed as the input to the
program. The program must print the number of days he needs to buy the toy as the output. using java programming
Answers
Answered by
0
A boy wants to save money to buy a toy. He puts money in his piggy bank every day. Every day, he puts
1 rupee more than the previous day. Every sunday, he starts with a new value 1 rupee more than the
previous sunday. The cost of the toy is T rupees. The boy already has X rupees in his piggy bank. On the
first sunday, he puts Y rupees in his piggy bank. The values of T, X and Y are passed as the input to the
program. The program must print the number of days he needs to buy the toy as the output. using java programming
Similar questions