Answered step by step
Verified Expert Solution
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 spaceseperated 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
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