Logic drills | Computer Science homework help

 

Write out the logic to the following problems.

Example: Represent the logic of a decision whether to wear a coat if  the temperature is less than 60 degrees Fahrenheit, and not to wear one  if the temperature is 60 degrees or greater.

Solution:

start

Declarations

        integer temperature

output “Enter temperature: “

input temperature

if (temperature <60)

        output “Wear coat.”

else

       output “Don’t wear coat.”

end if

stop

  1. Represent the logic of a program that allows the user the decide if  an employee is eligible for overtime pay.  If the employee is hourly,  then output “Eligible for overtime,” and  if the employee is salaried,  then output “Not eligible for overtime.”
  2. Represent the logic of a program decides which award to give an  employee based on years of service.  Someone with more than 25 years of  service gets a gold watch, and someone with 25 years or less of service  receives a pen and pencil set.
  3. Represent the logic of a program that allows the user to enter a  value between 1 and 100. The program determines if the value is even or  odd, and outputs either “The number is even,” or “The number is odd.”
Get 20% Discount on This Paper
Pages (550 words)
Approximate price: -

Try it now!

Get 20% Discount on This Paper

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Australia Assessments has gained an international reputation of being the leading website in custom assignment writing services. Once you give us the instructions of your paper through the order form, we will complete the rest.

Essays

Essay Writing Services

As we work towards providing the best custom assignment services, our company provides assignment services for any type of academic essay. We will help you develop professionally written essays that are rich in content and free from plagiarism.

Admissions

Admission and Business Papers

Our skilled team of professional writers will ensure that we help you craft a remarkable admission essay for your desired Master's program in your institution of choice. We won't stop there. Once you enter the job market, we will be available to secure you a position at your desired worksite by creating an outstanding portfolio or resume.

Editing

Editing and Proofreading

Our editorial team is always available for all editing and proofreading services. They check completed papers by our writers and also provide professional opinions to papers completed by our clients.

Coursework

Technical papers

We harbor professional academic writers with different qualifications in diverse academic fields. As such, we are capable of handling both simple and technical papers. Ensure that you provide us with correct and complete instructions in the order form.