C Assignment: Mother is the most loved person. She wants to surprise his son on his birthday so she prepares a birthday cake for one of his Child, and decides to write the child's age by candlelight...


C Assignment:<br>Mother is the most loved person. She wants to surprise his son on his birthday so she prepares a<br>birthday cake for one of his Child, and decides to write the child's age by candlelight on the cake.<br>There are 10 types of candles, one for each digit '0' to '9'. The mom has forgotten the child's age,<br>however, so he doesn't know he has enough candles of the right kind. For example, if the child was<br>101 years old, the cook would need two '1' candles and one '0' candle. With the supply of candles,<br>the chef has, your job is to find the most complete amount that can be represented by those<br>candles.<br>Input<br>1<br>2114063222<br>Output:<br>4<br>

Extracted text: C Assignment: Mother is the most loved person. She wants to surprise his son on his birthday so she prepares a birthday cake for one of his Child, and decides to write the child's age by candlelight on the cake. There are 10 types of candles, one for each digit '0' to '9'. The mom has forgotten the child's age, however, so he doesn't know he has enough candles of the right kind. For example, if the child was 101 years old, the cook would need two '1' candles and one '0' candle. With the supply of candles, the chef has, your job is to find the most complete amount that can be represented by those candles. Input 1 2114063222 Output: 4

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here