Create the switch statement to implement set of conditions

Assignment Help C/C++ Programming
Reference no: EM13784514

1. Given the following conditions, write the appropriate decision statements:

For S less than or equal to 1000, R is assigned 50
For S in the range of 1001 to 4000, R is assigned 100
For s in the range of 4001 to 8000, R is assigned 250
For S greater than 8000, R is assigned 75.

2. Given the following set of code:

If (Width = Length)
printf("Object is a squaren");
else
printf("Object is not a squaren");

What would be printed if Width had a value of 5 and Length had a value of 5?
What would be printed if Width had a value of 5 and Length had a value of 12?

3. Given the following information:

If a person has a job code of ‘H', their pay is based on the hours worked multiplied by their pay rate
If a person has a job code of ‘P', their pay is based on the hours worked multiplied by the number of pieces they produce
If a person has a job code of ‘S', their pay is based on their annual salary divided by 52
If a person has a job code of ‘C', their pay is based on their total sales multiplied by their commission rate.
If a person has any other job code, then that is an error and an appropriate message should be displayed.

Create the necessary switch statement to implement this set of conditions.

Reference no: EM13784514

Questions Cloud

Write paper for constitional law : Write Paper for constitional law
How does the present value of an ordinary annuity formula : If a company has a DSO above the industry average, what can the company do to get its DSO below the industry average? 2. How does the present value of an ordinary annuity formula compare with the present value of an annuity due formula?
Type of structure-functional-divisional-matrix-modular : What type of structure would you choose for your organization/business (simple, functional, divisional, matrix, modular, and/or virtual)? Explain why you chose a specific structure.
What is the expected value : The probability of being awarded the bid is 0.1, and anticipated profits are $150,000, resulting in a possible gain of this amount minus the $15,000 cost for the plans and model. What is the expected value?
Create the switch statement to implement set of conditions : Create the necessary switch statement to implement this set of conditions.
Who does not love reading a good article on the onion : A person can open the internet and find an article criticizing virtually anything. Satire is really used now more for political entertainment. Who doesn't love reading a good article on The Onion?
Strategic plan to grow the business or organization : Conduct a quick SWOT analysis to determine areas that offer opportunities for change.
Relationship between a firms strategy and its structure : Why is it important for managers to carefully consider the type of organizational structure that they use to implement their strategies? Discuss the relationship between a firm’s strategy and its structure. Thoroughly support and substantiate your re..
Thinking critically about advertising-subconscious messages : Briefly describe the path of information from the targeted sensory organ (i.e. eye, ear, skin, etc.) to the brain. Include a synthesis of terms/information from both Chapter 2 - Biological Basis of Behavior and Chapter 3 -Sensation and Perception..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Prepare a businesspartner

Prepare a BusinessPartner class that contains a company name, first name and a telephone number.

  Write a function to compute the volume of a cone

write a function to compute the volume of a cone by using the base radius r and the height h of the cone as the parameters of the function Vcone = xr^2h/3

  Function called timesten that returns back

Write a function called timesTen that returns back to the caller the value passed into the function multiplied by 10. If the value passed into the function is negative, the function also returns the string

  Use a loop in main to efficiently handle all three persons

Plan and finish writing the main program, and all the functions, including a constructor. Use a loop in main to efficiently handle all three persons' data.

  Write a program that allows a salesclerk to enter an item

Write a program in C++ that allows a salesclerk to enter an item's price and the quantity purchased by a customer.

  Refresher on andys basic requirements

The game Battleship is back and better than ever. Instead of hacking everything together in C, you will instead leverage C++ and all of your newly gained object oriented programming knowledge to construct a much cleaner end product.

  Design a class named employeerecord

Design a class named EmployeeRecord that holds an employee's ID number, name, and payrate. Include mutator methods to set the values for each data field and output the values for each data field. Create the class diagram and write the code that

  Program solves the n-queens problem

you will write a program that solves the N-Queens problem by the backtracking method. The pseudocode for the solution is on the last page. Your program should run in standard Java, either as an application or an applet.

  Distinguish syntax and purpose of while-loop and for-loop

Distinguish the syntax and purpose of while-loop and syntax of a for-loop. Give C++ code examples of both loops and descriibe the main differences.

  Write a version of function

Demonstrate me how to write a proper code for this problem and how to complete it

  Define a class named creditcardpayment

Create a main method that creates at least two CashPayment and two CreditCardPayment objects with different values and calls payment Details for each.

  Computer programming using c language lab

Computer programming using c language lab

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