Lengkap

Easy ones

Program 1 If the number is even, divide it by 2. If the number is odd, multiply it by 3 and then add 1. For example, if the original number were 13, the algorithm would generate the following sequence of numbers: 13, 40, 20, 10, 5, 16, 8, 4, 2, 1. This sequence has 10 terms counting the original number and the 1. Write a program that accomplishes the following three functions: Prompts the user for a positive integer input, or a zero to exit. This prompt should be repeated if the user enters a negative number. Outputs all the numbers in the sequence produced by the Ulam algorithm. Counts how many numbers are in the sequence, and outputs the count. ------------------------------------------------------- Program 2 A standard science experiment is to drop a ball and see how high it bounces. This establishes a "bounciness" index equal to the original height divided by the bounce height. The bounciness index is between 0 and 1 (including 0 but not including 1). This index is independent of the original height. For example, if the original height were 10 feet and the bounciness index were 0.6, the height of the first bounce would be 6 feet (10 * 0.6); and the height of the second bounce would be 3.6 feet (6 * 0.6). The total distance traveled on a bounce is the distance down plus the bounce up. Write an interactive program that accomplishes the following three functions: Gets the height and bounciness from the user. The height must be at least 0 and the bounciness must be equal to or greater than 0 and less than 1. You must error check both of these inputs. Calculates the total distance that the ball travels in 100 bounces and finds the height of the final bounce.

## Deliverables

1) Complete and fully-functional source code. 2) Need it ASAP.

## Platform

Pascal Delphi 6

## Deadline information

I need it by tomorrow Sunday the 6th.

Kemahiran: Delphi, Kejuruteraan, MySQL, PHP, Kejuruteraan Perisian, Ujian Perisian

Lihat lagi: science algorithm, program algorithm example, index of code source delphi, algorithm functions, php less than or equal to, pascal, deadline sunday, bounces, ball source, sunday tomorrow, bounce source code, distance algorithm php, ball bounce, code delphi algorithm, bounce ball, delphi pascal, program pascal, zero divide error, ball code, input positive numbers

Tentang Majikan:
( 6 ulasan ) Grafenw?hr, Germany

ID Projek: #2874565

Dianugerahkan kepada:

danieldeady

See private message.

$3 USD dalam 14 hari
(17 Ulasan)
3.5

6 pekerja bebas membida secara purata $14 untuk pekerjaan ini

delphiz

See private message.

$12.75 USD dalam 14 hari
(33 Ulasan)
5.2
nullconsulting

See private message.

$21.25 USD dalam 14 hari
(36 Ulasan)
5.2
aknminc

See private message.

$21.25 USD dalam 14 hari
(6 Ulasan)
3.2
drewjensen

See private message.

$12.75 USD dalam 14 hari
(3 Ulasan)
1.4
msocolin

See private message.

$12.75 USD dalam 14 hari
(0 Ulasan)
0.0