Spread the word.

Share the link on social media.

Share
  • Facebook
Have an account? Sign In Now

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 18551
Next
Answered

SIKSHAPATH Latest Questions

Hacker
  • 0
  • 0
Hacker
Asked: June 10, 20222022-06-10T00:07:35+05:30 2022-06-10T00:07:35+05:30In: C++

A Tourist Attraction Calculation System Silver Express Theme Park (SETP) …

  • 0
  • 0

A Tourist Attraction Calculation System Silver Express Theme Park (SETP) Pvt Ltd is a tourist attraction that offers three types of tickets:

  1. Regular adult tickets at R30 per person.
  2. Student tickets at R25 per person.
  3. Family ticket for two adults and two children is R75, with an additional R15 for each child beyond two children.

They have approached you as a C++ developer to develop a C++ application that would help to calculate the total price of tickets.

 

  1. The program should display a menu with three options.                                (3 Marks)
  2. The program should ask the user to select the type of tickets needed. If the first or second option are selected, the program should ask the user to enter the number of people in the group. However, if the third option is selected, the program should ask the user to enter the number of additional children in the group.                                                 (13 Marks)
  3. The program should then calculate the total amount due and display it on the screen. (8 Marks)

d. Make sure that the user cannot select invalid options in the menu and that the number of people in the group is always greater than 0.

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

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. ADMIN 2
      Best Answer
      ADMIN 2
      2022-06-10T12:17:23+05:30Added an answer on June 10, 2022 at 12:17 pm
      This answer was edited.

      Code:

      #include <iostream>
      
      using namespace std;
      
      int main(void)
      
      {
      
      int choice;
      
      cout<<"\n Silver Express Theme Park Pvt. Ltd.";
      
      cout<<"\n===========================";
      
      cout<<"\n 1.Regular Adult";
      
      cout<<"\n 2. Student";
      
      cout<<"\n 3.Family Ticket";
      
      cout<<"\n Enter the type of ticket which you want: ";
      
      cin>>choice; //input taking
      
      if(choice==1){ //adult tickets total amount calculation
      int count;
      cout<<"Enter no.of persons:";
      cin>> count;
      if(count>0)
      cout<<"Total amount due is :"<< count*30;
      else
      cout<<"no.of persons must be greater than zero";
      }
      else if(choice==2){ //student tickets total amount calculation
      int count;
      cout<<"Enter no.of persons:";
      cin>> count;
      if(count>0)
      cout<<"Total amount due is :"<< count*25;
      else
      cout<<"no.of persons must be greater than zero";
      }
      else if(choice==3){ //family tickets total amount calculation
      int count;
      cout<<"Number of additional children in the group(more than 2):";
      cin>> count;
      if(count>0)
      cout<<"Total amount due is :"<< (count*15)+75;
      else
      cout<<"no.of persons must be greater than zero";
      }
      else{ //invalid option
      cout<<"Invalid Option";
      
      }
      }
        • 0
      • Reply
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • 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 149
    • Best Answers 89
    • This Free AI Tool Translates Entire Books in Minute !
    • AI News: 🎬 Hollywood’s AI Studios, 🎓 OpenAI’s Latest Gift to Educators, 🚚 Class8 Bags $22M, 🧠 Google Gemini’s Memory Upgrade
    • AI NEWS: Legal Action Against OpenAI, $16M Paid, & Elon Musk’s Praise from Investor 🤖💰📑 | AI Boosts Cloud Seeding for Water Security 🌱💧
    • AI News: 🎬AI Video Tool Scam Exposed🤯, 🛰️ AI-Powered Drones to Ukraine 😱, Google’s $20M AI Push, Sam Altman Joins SF’s Leadership Team
    • AI News: 🤝 Biden Meets Xi on AI Talks, 💡 Xavier Niel’s Advice for Europe, ♻️ Hong Kong’s Smart Bin Revolution, 🚀 AI x Huawei

    Explore

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

    Footer

    SIKSHAPATH

    Helpful Links

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

    Follow Us

    © 2021-24 Sikshapath. All Rights Reserved

    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.