Client Login Register
Calculate Price & Order →
← Back to all articles

Reinforcement Exercises

Published on December 02, 2026 • Category: Academic
Reinforcement Exercises

Reinforcement Exercises

Exercise 2-2

In this project, you will write a while statement that displays all odd numbers between 1 and 100 on the screen.

1. Create a new document in your text editor.

2. Type the<!DOCTYPE>declaration,<html>element, document head, and<body>element. Use the strict DTD and “Odd Numbers” as the content of the<title>element.

3. Create a script section in the document body with a while statement that displays all odd numbers between 1 and 100 on the screen.

4. Save the document as OddNumbers.php in the Projects directory for Chapter 2, and then upload the document to the server.

5. Open the OddNumbers.php fi le in your Web browser by entering the following URL:http://<yourserver>/PHP_Projects/Chapter.02/Projects/OddNumbers.php

.6. Close your Web browser window.




Share

We only email you; unsubscribe in one click. No address is ever sold.

Ask about study support 💬 WhatsApp 📞

Just now