Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Zoe went to a gift shop to buy a gift for her best friend . There are different kinds of gifts in the gift shop.Zoe

Zoe went to a gift shop to buy a gift for her best friend .There are different kinds of gifts in the gift shop.Zoe wants to buy her the most expensive gift,but the most expensive gifts are out of stick.So she wants to buy her best friend the second most expensive gift in the shop.
Write a program in java that reads an integer N, and N number of space-seperated costs of the gifts and prints the cost of the second most expensive gift she can buy for her best friend. If there are no second most expensive gift in the shop print No gifts avaliable.

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 In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

Students also viewed these Databases questions

Question

Excel caculation on cascade mental health clinic

Answered: 1 week ago

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago

Question

e. What are notable achievements of the group?

Answered: 1 week ago