Вы находитесь на странице: 1из 2

1.

Activity 1
Create a simple PHP program to print your full name with a red font using a 25 pitch font. Your
name should be centered and followed by your email address as an active link using mailto. This
could be done using just HTML, but instead use the echo statement to print out each of the
items.
2. Activity 2
First create a file named "Activity2.php" in a directory that is recognized by the web server.
The file should contain the following information:

<html>
<h3>Simple Calculations</h3>
<?php
$a = 6;
$b = 2;
echo "The Value of a = $a <br>";
echo "The Value of b = $b <br>";
$c = $a + $b;
echo "The a + b = $c <br>";
$c = $a - $b;
echo "The a - b = $c <br>";
$c = $a * $b;
echo "The a * b = $c <br>";
$c = $a / $b;
echo "The a / b = $c <br>";
$c = $a % $b;
echo "The a % b = $c <br>";
$c = ++$a + $b;
echo "The ++a + b = $c <br>";
$c = --$a + $b;
echo "The --a + b = $c <br>";
echo "That's all folks!"; ?>
</html>

3. Activity 3

Create a program titled "futureValue.php" to calculate the future value for the following
equations. First create a set of variables: interest, term, payment, and principle. Assign realistic
values to each of these variables.

1. Payment Compound Interest

term
(1+interest) -1)
future value= payment*------------------ *(1 + interest)
interest
2. Simple Interest

future value= principal*(1+interest)

3. Compound Interest

term
future value= principal*(1+interest)

You program should print the variables, there names, and the three different future value
calculations.

4.

Вам также может понравиться