Monday, November 18, 2019

                                    E-BOX    

                                BASICS OF C PROGRAMMING   

Conditional Statements :-  Code Analysis

 PROBLEM -18

                                                    Luxury Bus Vs Share Auto


1st June 2014 is a very auspicious day and 3 of Sita's friends are getting married on that day. Sita has decided to purchase gifts for them in advance and she plans to visit 'The Personalized Gifts' store in Fun Mall. She is a regular visitor to this shop.

 

She has just read an article on sustainable enery resources and she was very much impressed by the article and she decided to follow some of the suggestions given in the article in order to contribute a small amount towards saving enery resources.

 

One of the suggestions in the article is Use Public Transport whenever possible. She decides to go by Luxury Bus or a Share Auto.
                OR              

The cost of travelling by Luxury Bux is Rs.X and the cost of travelling by Share Auto is Rs.Y.

 

She plans to spend minimal amount for travel.

Given X and Y, help her to decide whether to travel by luxury bus or by share auto.

 

Input and Output Format:

Input consist of 2 integers – X and Y. Assume that X is never equal to Y. Refer sample input and output for formatting specification.

 

[All text in bold corresponds to input and the rest corresponds to output]

Sample Input and Output 1:

Enter the cost of travel by luxury bus

40

Enter the cost of travel by share auto

35

Minimal cost travel is by auto

 

Sample Input and Output 2:

Enter the cost of travel by luxury bus

30

Enter the cost of travel by share auto

45

Minimal cost travel is by bus


SOLUTION :




No comments:

Post a Comment

                                                 E-BOX                                                     BASICS OF C PROGRAMMING       i -...

https://amzn.to/2LAmadv