HW 2 - JavaScript: Basic Operations


Part 1 Displays, as XHTML text, the numbers 1 to 4 on the same line, with each pair of adjacent numbers separated by one space.
Part 2 Prompts for two integers, and then outputs XHTML text that indicates whether the first integer is a multiple of the second.
Part 3 Prompts for three integers and displays the sum, average, product, and the smallest and largest of the integers in an alert dialog.
Part 4 Calculates the squares and cubes of the numbers 1 to 6 and outputs XHTML text that displays the resulting values in a table format.
Extra Credit Create a webpage that contains a script that inputs 5 numbers and determines and outputs HTML or XHTML text that displays the number of negative numbers input, the number of positive numbers input, and the number of zeros input.


back

Hosted by www.Geocities.ws

1