Pseudo code in the comments

Assignment Help Basic Computer Science
Reference no: EM131186734

1. Write a program. After reading the specifications below, write the pseudo code in the comments before writing the code. The program should ask the user to enter an item's wholesale cost and it markup percentage. (cost of product * markup percent = markup) (retail = cost of product + markup) The program should validate the inputs. (Note: markup should be greater than zero but less than one) The program should display the item's retail price with two decimal places. The program should have a void function named calculateRetail that receives the wholesale cost and the markup percentage as arguments, does the math and displays the retail price. The program should employ a do-while loop to ask the user if they desire to find the retail price of another product.

2. Write a program. After reading the specifications below, write the pseudo code in the comments before writing the code. The program should ask the user what would they like to do: convert a Fahrenheit temperature to Celsius (F = 9/5 C + 32) or convert a Celsius temperature to Fahrenheit. (C = 5/9(F-32)) The program should validate the input and then, depending on the choice the user makes, ask for a temperature and do the conversion. Use a switch case to handle the choice the user makes. Each choice should call a void function to do the math and display the result to one decimal place. Be sure to test your program.

3. Write a program. After reading the specifications below, write the pseudo code in the comments before writing the code. The program should ask user for the mass and velocity of an object. Validate inputs. Pass inputs to a void function that calculates the kinetic energy of the object. formula is KE = 1/mv2 void function should calculate and display results. Program asks if user wants to calculate the KE of another object and starts over if Yes.

Reference no: EM131186734

Questions Cloud

Relationship of the corporate strategy to the it alignment : What is the relationship of the corporate strategy to the IT alignment of that strategy? Should the corporate strategy determine the IT alignment, or should the strategy support the IT alignment? Why?
Difficulty in finding any effect from program intervention : Which of the following contributes to the difficulty in finding any effect from a program intervention? The biggest advantage of an export management company is usually its ________.
Creating and editing fonts in multimedia : State and explain three softwares that can be used in creating and editing fonts in multimedia.
Prepare employees for work in a foreign country : From the e-Activity, recommend two (2) actions that HR managers can take in order to prepare employees for work in a foreign country. Justify your response.
Pseudo code in the comments : Write a program. After reading the specifications below, write the pseudo code in the comments before writing the code. The program should ask the user what would they like to do: convert a Fahrenheit temperature to Celsius (F = 9/5 C + 32) or con..
Disadvantage of strategic alliances : Below is a database filled with data from a short evaluation questionnaire. The headings for the rows and columns have been left blank. If you were to fill in the headings for the rows and columns, by convention, with the responders and the questionn..
Are supervisor spending sufficient time training employees : Are supervisor spending sufficient time training new employees the methods? In safety, can the employee explain how the safety precautions taught to them affect them and can they give the feedback?
Force international companies to cancel proposed investments : Which of the following is a source of secondary data for conducting international market research? Which of the following will most likely force international companies to cancel proposed investments?
Information systems for competitive advantage : Using the competitive forces model, discuss how an organist of your choice has successfully used information systems for competitive advantage.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Find the speed of the car

A shooter shots gunfire at an interval of 16 seconds. A man in a car that starts travelling from a distance of 160 km can hear the gunshots at an interval of 15 seconds. Find the speed of the car. [You may assume the speed of sound to be 330 m/s].

  Write a java for file processing according to rules

The file is read into memory, all of it in one buffer, and the buffer is reversed, then the file is overwritten. For simplicity, we may assume that the maximum size of the file is 200000 bytes. If no file was selected an error message is displayed..

  How dui charges of domestic violence and influence career

Sensitive information and may end up in court as technical or expert witness. How can things like a DUI, charges of domestic violence and other items influence your career?

  Make a list of the field names and field types

1.Make a list of the field names and field types you plan to include in the table. What fields are you going to put in this table? What are their field types? Would it make sense to reduce any of the field sizes? Do you need to add captions?

  Write a program that accepts as input the mass

Write a program that accepts as input the mass,in grams, and density, in grams per cubic centimeters, and outputs the volume of the object using the formula: volume=mass/density. format your output to two decimal places

  Write the code to retrieve and read data using this approach

Write the code to retrieve and read the data using this approach.

  Design and create a website with html

Your task is to create a website on anything that is of interest to you. The website will need to have minimum of 3 web pages. This means that you have an index page that will link to other pages and vice versa.

  Write down the least squares normal equations

Write down the least squares normal equations for this situation. Solve the normal equations.

  Borrowers on mortgage application forms

Why did mortgage lenders frequently not check on information provided by potential borrowers on mortgage application forms during the 2000 to 2007 period?

  Most important element to ensuring high availability

Give your opinion on what you believe to be the most important element to ensuring high availability on an enterprise network. Explain your rationale.

  Create three integer variables and initialize them

Create three integer variables and initialize them to whichever value you'd like. ? Create three functions: ? A function that accepts two integers as parameters and subtracts the second from the first.

  Introductory style of research on the web

Complete some introductory style of research on the Web in order to develop a good sense of what XML is, and how it is most commonly used. The context for this research is "Data, XML and the Internet."

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