Learn more about our help with Assignments:Algorithms

Algorithms

Draw a flowchart that displays 3 inputted numbers in ascending order.

Algorithms

The challenge is to find all the pairs of two integers in an unsorted array that sum up to a given S.

For example, if the array is [3, 5, 2, -4, 8, 11] and the sum is 7, your program should return [[11, -4], [2, 5]] because 11 + -4 = 7 and 2 + 5 = 7.

Algorithms

A school has 1800 students. The start date and leaving date for each student is stored on file. Dates are in the format YYMMDD (e.g. a student starting on 10th September 2007 and leaving on 4th August 2012 has the data 070910 and 120804 on file).

(a) Write an algorithm, using pseudocode or otherwise, which

• inputs Student ID for all 1800 students

• inputs the start date and leaving date for each student

• carries out a check to ensure the second date is later

• if error, increments error counter

• outputs the number of errors

Algorithms

Algorithms

Algorithms

1. Create a flowchart that will accept two numbers. Determine and display which input number is greater.

2. San Miguel Company plans to give a year-end bonus to each of its employee. Consider the following

criteria.

A. If employee’s monthly salary is less than 10,000, the bonus is 2,000.

B. If employee’s monthly salary is greater than 10,000, the bonus is 50% of the salary.

显示the SALARY and BONUS of the employee.

Algorithms

Find Quick sort of this array step by step

5,3,9,5,4,1,5,6,5

Algorithms

Algorithms

Write an algorithm that displays a series of the Celsius temperatures 0 through a termination value and their Fahrenheit equivalents. The formula for converting a temperature from Celsius to Fahrenheit equivalents. The formula for converting a temperature from Celsius to Fahrenheit is

F = 9/5 C + 32

Where F is the Fahrenheit temperature and C is the Celsius temperature. Your algorithm must use a loop to display the series.

Sample Output of the program is given below.

Enter the highest Celsius temperature value: 5

Fahrenheit equivalent of 0 is 32

Fahrenheit equivalent of 1 is 33.8

Fahrenheit equivalent of 2 is 35.6

Fahrenheit equivalent of 3 is 37.4

Fahrenheit equivalent of 4 is 39.2

Fahrenheit equivalent of 5 is 41

Algorithms

A random variable X ~ bino(5, 0.3). g(x) is a continuous and differentiable function on the interval (0, 5).

a. Write down the cumulative distribution function F(x) for the random variable X.

b. g(x) is an approximation of F(x). Construct g(x).