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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started