Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have permission to ask a question, You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

SIKSHAPATH

SIKSHAPATH Logo SIKSHAPATH Logo

SIKSHAPATH Navigation

  • Home
  • Questions
  • Blog
    • Computer Science(CSE)
    • NPTEL
    • Startup
  • Shop
    • Internshala Answers
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Questions
  • Blog
    • Computer Science(CSE)
    • NPTEL
    • Startup
  • Shop
    • Internshala Answers
Home/Questions/Q 18629
Next
In Process
Hacker
  • 0
Hacker
Asked: June 12, 20222022-06-12T01:28:23+05:30 2022-06-12T01:28:23+05:30In: C++

Shoprite is a grocery shop that has outlets nationwide. They …

  • 0

Shoprite is a grocery shop that has outlets nationwide. They give discounts to customers who buy products in bulk. For a given number of products their discounts are as follows:
Quantity              Discount
0 – 20                   No discount
More than 20     10%
More than 30     15%
More than 40     20%
More than 50      30%
They are planning to get a computerised system which automates calculation of total amount due for a given number of products.

1 Based on the above scenario, design a solution for Shoprite using a flowchart.

2 Based on the outcome of Question 3.1, create a C++ program using Visual Studio. Your program must enter the quantity of products then compute the discount based on the quantity and output the total amount due.

  • 1 1 Answer
  • 138 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. I'M ADMIN
      2022-06-12T12:52:07+05:30Added an answer on June 12, 2022 at 12:52 pm

      If you have not followed us yet, follow us on insta for collaboration and promotion.

      Follow us on Social Media
      telegram instagram

       

      CODE:

       

      //VISIT SIKSHAPATH.IN FOR MORE
      #include<iostream>
      using namespace std;
      
      int main()
      {
      int qty,price;
      float discount,total;
      cout<<"Enter Quatity:";
      cin>>qty;
      cout<<"Enter the Price:";
      cin>>price;
      if(qty<20)
      discount=0;
      else if(qty<30)
      discount=0.1;
      else if(qty<40)
      discount=0.15;
      else if(qty<50)
      discount=0.2;
      else
      discount=0.3;
      total=qty*price;
      discount=discount*total;
      cout<<"Total amount used:"<<total<<endl;
      cout<<"Eligibile discount:"<<discount<<endl;
      total=total-discount;
      cout<<"Grand Total:"<<total<<endl;
      }
      • 0
      • Reply
      • Share
        Share
        • Share on WhatsApp
        • Share onFacebook
        • Share on Twitter
        • Share on LinkedIn

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    store ads

    Stats

    • Questions 1k
    • Answers 1k
    • Posts 141
    • Best Answers 64
    • AI 101: Create Presentation Slide Using AI | Gamma App
    • What is the Difference Between Section, Article and Aside in HTML5?
    • How to enable or disable ChatGPT on the Windows 11 taskbar
    • NPTEL Data Mining Assignment Answers 2023 -Week 8
    • NPTEL Data Mining Assignment Answers 2023 -Week 7

    Explore

    • Recent Questions
    • Questions For You
    • Answers With Time
    • Most Visited
    • New Questions
    • Recent Questions With Time

    Footer

    Sikshapath Logo

    Helpful Links

    • Contact
    • Disclaimer
    • Privacy Policy Notice
    • TERMS OF USE
    • FAQs
    • Refund/Cancellation Policy
    • Delivery Policy for Sikshapath

    Follow Us

    © 2021-23 Sikshapath. All Rights Reserved

    Ads Blocker Image Powered by Code Help Pro

    Ads Blocker Detected!!!

    We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

    Refresh
    Powered By
    Best Wordpress Adblock Detecting Plugin | CHP Adblock

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.