Basic algorithm and pseudocode help

Assignment Help Data Structure & Algorithms
Reference no: EM13779094

1. An area is calculated by multiplying the length by the width. The pseudocode program below should ask the user for the length and width of a rectangular room in order to calculate the area, and display the room's area. Will it do the job?
area = width * length

Display "What is the room's width?"
Display "What is the room's length?"

2. Write a pseudocode algorithm for the program Credit Available: calculates a customer's credit
available  should ask the user for the customer's maximum credit amount; the credit used by the
customer calculate and display the customer's available credit using the data inputted.

3. Write a pseudocode algorithm for the program Account Balance: calculates the current balance in a bank account
 ask the user for the starting balance, total amount of debits, credits and the monthly interest rate

 calculate the current balance with the inputs 

display the information on the screen

4. Write a pseudocode algorithm for the program HST:

calculates the total of a retail sale  ask the user for the retail price of the purchased item

calculate and display the HST (13%) for the purchase and the total of the sale

5. Write a Java program that converts mile to Kilometers. (One mile equals 1.60935 kms) Read the miles value from the user as a floating point value.

6. Write a Java program that determines the value of the coins in a jar and prints the total in dollars and cents. Read integer values that represent the number of quarters, dimes, nickels, and pennies.

7. Write a program that reads the radius of a sphere and prints its volume and surface area using the following formula. Print the output to four decimal places. r represents the radius:

Reference no: EM13779094

Questions Cloud

Compare the amplitude of the two sinewaves : Store the 600 sample values of x[n] in file filex and store the 600 sample values of y[n] in file filey. Graph x[n] and y[n] on the same graph using Excel. Compare the amplitude of the two sinewaves x [n] and y[n].
Write a term paper about early adulthood : Write a term paper about Early Adulthood. Students are expected to identify the perspective of the contemporary theory and describe current research and application to the field of lifespan development.
Diversity-related situation or cultural dilemma : Provide an analysis of the topic, including historical perspective and current day situation. Explain why this is a topic of interest.
Do you believe the employer''s actions were legal : Conduct research to provide examples to support your position and use your own personal employment experiences when possible. Have you observed situations where an employee was fired? Did the employer give a reason? Do you believe the employer's a..
Basic algorithm and pseudocode help : An area is calculated by multiplying the length by the width. The pseudocode program below should ask the user for the length and width of a rectangular room in order to calculate the area, and display the room's area.
Explain what sarbanes oxley means to you : Read the article Governance in the Spotlight: What Sarbanes Oxley means to You. In this article the author outlines provisions companies are now required to implement
Ineffective for combating terrorism & illegal : Under John Stuart Mill's "harm principle," government may regulate private activities?
Assessment from chemical dependency : Select an assessment from Chemical Dependency: A Systems Approach with faculty approval and administer the instrument to someone you know who drinks, uses drugs, or both.
Explain the responsibilities and ethical concerns : When U.S. companies do business in other countries, what issues do they face? Describe the responsibilities and ethical concerns that you feel are important for U.S. companies to consider when doing business in other countries

Reviews

Write a Review

 

Data Structure & Algorithms Questions & Answers

  Explaining instruction format of operation code field

Operation code field, a mode field, to specify one of seven addressing modes, a register address field to specify one of 60 processor registers, and memory address. Specify instruction format and number of bits in each field if the instruction ..

  Opens an output file with the external name

Design an algorithm that does the following: opens an output file with the external name number_list.dat, uses a loop to write the numbers 1 through 100 to the file and then closes the file.

  Write a program to perform stack operations

Write a program to perform stack operations - pus, pop, display.

  Store the grades that you read in an arraylist

We expect the file to contain grades represented by integer values, one per line. If you encounter a value that is not an integer, you should throw an exception, print a message to the console, skip that value, and continue processing.

  What would ultimate result of algorithm

Single grain of wheat was to be placed on the first square of chess board, two on second, four on third, eight on the fourth, and so on, until all 64 squares had been filled. What would ultimate result of this algorithm have been?

  Q1 determine the minimum weighted path length p for six

q.1. determine the minimum weighted path length p for six weights 4 15 25 5 8 16. draw the huffman tree also for the

  Question related to sequential files

In spite of the fact that sequential files lack direct targeted addressing of each of the records and fields, they are the most widely used.

  Write the selection sort algorithm

Write the selection sort algorithm

  Reverse path flooding

Suppose we have a network of nodes connected via point to point links, and source S sends a message that will be broadcast to all nodes using Reverse Path Flooding.

  Rewrite pseudocode of warshalls algorithm assuming that the

rewrite pseudocode of warshalls algorithm assuming that the matrix rows are represented by bit strings on which the

  Complete the program that solves the eight queens

Complete the program that solves the Eight Queens problem. The program's output should look similar to:

  Designing an algorithm for task-array of person numbers

You have been allotted task of designing an algorithm for following task. Someone has built the array of person numbers of all n students enrolled in 331 this fall.

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