Find the discount applicable using nested if-else

Assignment Help Business Management
Reference no: EM132322707

Given GENDER (1 for male and 0 for female) and AGE of a person, find the discount applicable using nested if-else statements. Use c programming language

Build a program to display discount based on following conditions::

  • If the age of a male is less than or equal to 15, discount is 20 or 15 if the age is greater than 15.  
  • If the age of a female is less than or equal to 15, discount is 30 or 25 if the age is greater than 15.

Use nested if-else statement.

Input 

30 

Where, 

  • The first line of input represents GENDER. 
  • The second line of input represents AGE. 

Output 

15 

Here, gender is male and age is greater than 15. Hence, the discount will be 15.

Assume that, 

  • GENDER is an integer that can be 0 or 1.  
  • AGE is an integer within the range [1 to 99].

Reference no: EM132322707

Questions Cloud

Determining the maximum area of a field : Determining the maximum area of a field you could create with a collection of 15 fence sections, each eight feet in length.
Basic components required to set up type of network : Assume you want to set up a simple network that allows two or more PCs to share files. You also want these PCs to be able to access the public Internet.
Write a philosophy of youth ministry : The biblical and theological concepts that shape your youth ministry Scholars, research or authors that influence and inform your youth ministry.
Creating reverse shell using tcp session hijacking : HS3011 - Information Security - Holmes Institute - Creating Reverse Shell using TCP Session Hijacking - conduct attacks on the TCP/IP protocols.
Find the discount applicable using nested if-else : Given GENDER (1 for male and 0 for female) and AGE of a person, find the discount applicable using nested if-else statements. Use c programming language
Write a review and analysis of this childrens classic : Analyze your textbook assigned theory into your response or analysis of this children's classic. Rview Thumbelina in terms of TYPES of CONFLICT .
Implementation of new it-based business strategies : What are several change management solutions for end-user resistance to the implementation of new IT-based business strategies and applications?
Office setting and its benefits : Explain wired and wireless in an office setting and its benefits.
Analyze data to determine whether you will reject or fail : DATA SET 1 - Analyze this data to determine whether you will reject or fail to reject the null hypothesis based upon your results

Reviews

Write a Review

Business Management Questions & Answers

  Price elasticity of demand different

For a linear demand line, the slope is constant and so is inverse of the slope. Why then the price elasticity of demand different at each point on the demand curve?

  Why companies adopt a performance excellence philosophy

What are the reasons why companies adopt a performance excellence philosophy?

  How should aa adjust to maximize profits

Again, assume AA can discriminate as above, but now the airline is constrained by the number of seats available: the maximum number of seats is 300.

  Leadership development programs in public sector

What subjects or topic areas should be included in leadership development programs in the public and private sector?

  Level production amount without backorders

Period 2; and 5,400 hours for Period 3, what would be the level production amount without backorders?

  Schedule performance index for the project

What are the cost variance, schedule variance, cost performance index, and schedule performance index for the project?

  Think of unconventional media

Think of unconventional media to convince people to stop smoking, to drink responsibly, and to recycle. Now develop messages for each of these issues.

  What is the value of regulation and accreditation

What is the value of regulation and accreditation? Does regulation help or hinder efficiency? Quality?

  Role of leadership when commercial realities

According to Firestion's tire recall case, discuss and evaluate the role of leadership when commercial realities conflict with public concerns

  List all of the forms of compensation

List all of the forms of compensation you receive from your job at a school district?

  Conduct a brief organizational analysisconduct a brief

conduct a brief organizational analysisconduct a brief organizational analysis by answering the following questions1.

  What problems could arise when using open systems theory

ORG-812: Discuss what problems could arise when using Open Systems Theory. Given these problems, is it worth using Open Systems Theory in an organization?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd