Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write this in C programing language. (1) Lucky Day Elsa is a very superstitious girl. Every morning she asks her maid to get N

Please write this in C programing language.

image text in transcribed

(1) Lucky Day Elsa is a very superstitious girl. Every morning she asks her maid to get N roses from her garden. Then she counts the number of petals of those roses. Elsa calls the day a lucky day if the number of roses with the minimum count of petals is odd, otherwise she considers the day as an unlucky day. Help Elsa in finding if the day is lucky or not Input Format: Take input from the console. The first line contains a single integer T denoting the number of test cases. First line of each test case consists of a single integer N denoting the total number of roses picked on a day. Second line of each test case consists of N space separated integers denoting the number of petals of the roses. Output Format: For each test case, print "Lucky" (without quotes) if the number of roses with the minimum count of petals is odd, otherwise print "Unlucky" (without quotes). Print a new line after each test case. Sample Input: 2 8 89 5 9 5 5 5 10 5 Sample Output: Lucky Unlucky

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

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

1.Which are projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago