Question: PROGRAM IN C Write a program in C that asks the user for an integer that represents the number of candles on your sibling's birthday

PROGRAM IN C

Write a program in C that asks the user for an integer that represents the number of candles on your sibling's birthday cake, and then store the height of each candle in an array. Then calculate the number of candles he successfully blew out in first try, assuming he is able to blow out only the tallest ones. The tallest candles are all the same height.

You should have separate function for finding the height of tallest candles, and another function for finding how many candles he blew. Print result in the main().

Example output:

Please enter the number of candles: 4

Please enter the height of each candle: 3 2 1 3

He blew out 2 candles

In this example the tallest candles are the ones with height of 3. Based on the assumption that he is able to blowout only the tallest candles he can only blow out 2 candles in the first try.

thankyou!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!