Question: In this exercise, you will write a while statement that displays all odd numbers between 1 and 100 on the screen. Complete the steps below:

In this exercise, you will write a while statement that displays all odd numbers between 1 and 100 on the screen. Complete the steps below: 1. Open Notepad++ and create a new document. 2. Type the declaration, element, header information, and element. Use the strict DTD and Odd Numbers as the content of the 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 OddNumbersLastname.php (Lastname should be your last name) in the Projects directory of your student data files. Open it in your Web browser to see how it renders.</p> <p>This is what I have done so far, when I run it in my browser it shows what I typed and not the odd numbers 1-100...I'm not sure what to do. </p> <p> </p> <p><!DOCTYPE html></p> <p> </p> <p><html></p> <p> </p> <p><head></p> <p><title>Odd Numbers

$i=1;

while($i<=100)

{

echo $i;

$i=$i+2;

}

?>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!