Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

What are the mean and standard deviation for V140?

Answered: 1 week ago

Question

2. Outline the functions of nonverbal communication

Answered: 1 week ago