Sita owns the valuable customer card in the Personalised Gifts store. Sita purchases 3 gift articles priced at Rs.r1, Rs.r2 and Rs.r3. As a valuable customer, she can avail one of the 2 offers --- 20% discount on each of the 3 items purchased or she can go for an offer where she will get 1 item of the lowest cost-free.

Which of the 2 offers would be beneficial for Sita? Can you please help her out?

Input Format:
Input consists of 3 integers that correspond to r1, r2, and r3.

Output Format:

The output is a string that is either 'DISCOUNT' or 'FREE ITEM'.

Sample Input 1:
25
25
50
Sample Output 1:
FREE ITEM

Sample Input 2:
10
70
50
Sample Output 2:
DISCOUNT


Program Code:
#include<stdio.h>
int main()
{
    int r1,r2,r3,d,discount;
    scanf("%d%d%d",&r1,&r2,&r3);
    discount=(r1+r2+r3)*20/100;
    if(r1<r2 && r1<r3)
    {
        d=r1;
    }
    else
    {
        if(r2<r3)d=r2;
        else d=r3;
    }
    if(discount<d)
    printf("FREE ITEM");
    else
    printf("DISCOUNT");
    return 0;
}
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

6 comments:

  1. I found your this post while searching for some related information on blog search...Its a good post..keep posting and update the information.
    pillow printing

    ReplyDelete
  2. Nice post, keep up with this interesting work. It really is good to know that this topic is being covered also on this web site so cheers for taking time to discuss this! family tree gifts

    ReplyDelete
  3. A great content material as well as great layout. Your website deserves all of the positive feedback it’s been getting. I will be back soon for further quality contents. eyeskady

    ReplyDelete
  4. pl i need this program in python

    ReplyDelete
  5. Excellent! Thanks for providing such a great article. You can also read our blog : Photo cushion

    ReplyDelete
  6. Thank you dear, I found your information really useful. I would like to say thanks once again for this information. we provide WeWrapSmile Enchanting World of Hampers, Mugs & Fragrances please visit my website.Online gift delivery in gurgaon same day

    ReplyDelete