Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions