1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Elden [556K]
3 years ago
9

PHP Create a for loop that initialize with the variable $i = 10 The loop outputs $i as long as $i is greater than 1 using for lo

op Use echo statement to output $i Make sure to use operator based on the desired condition mentioned (increment $i++ / decrement $i–) Make sure each line of code ends with a semi colon i.e ;
Computers and Technology
1 answer:
Tanzania [10]3 years ago
4 0

Answer:

The PHP code is as follows

<?php

for ($i = 10; $i>1; $i--)

{

echo $i.' ';

}

?>

Explanation:

The code is self explanatory and doesn't require comments before it can easily understood.

The program starts with a php opening tag <?php

And it ends with the closing tag ?>

The interpretation of the question is to print integer values from 10 to 1

To do this, an iteration is needed.

The above program makes use of a for loop iteration.

Analysis;

for ( -> This shows that it is a for loop iteration

$i = 10; -> Iterating variable $i is initialized to 10 (that is; printing will start at 10)

$i>1; -> Iteration is valid while $i is greater than 1 (e.g. 2,3,4...10)

$i-- -> For every Iteration, decrease $i by 1

) -> End of Iterating condition

echo $i.' '; -> This line prints the valid values of $i. In this case, the values of $i is from 10 and stops at 2

The output is as follows

10 9 8 7 6 5 4 3 2

You might be interested in
The class constructor function must have the same_______ as the class,
inn [45]

Answer:

Name.

Explanation:

The constructor in the class must have the same name as the class.Constructors are used to initialize the object when created.There are basically three types of constructors which are as following:-

  1. Default Constructor.
  2. Parameterized Constructor.
  3. Copy Constructor.

Default Constructor:-This constructor is already present in the class when the class is defined.It does not have any arguments.

Parameterized Constructor:-As the name suggests this constructor have parameters that are used to initialize the object.

Copy Constructor:-This constructor is called whenever an object is copying the values of other object.For example:-

There is already an object present with name obj1.

class obj2=obj1;

5 0
3 years ago
Blender questions
Tamiku [17]
<span>14. A mesh represents a(n) _____ object if its faces enclose a positive and finite amount of space. (1 point)

odd

connected

simple

convex



15. Which of the following is the 3-D view port? (1 point)

the standard layout used for new files

the polygon viewing on the default screen

straight line segments connecting two vertices

a single static image in 3-D

The answer for number 1, should be:
SOLID
</span><span>A mesh represents a solid object if its faces enclose a positive and finite amount of space
</span>
The answer for the second question is:
a single static image in 3-D
4 0
2 years ago
Read 2 more answers
COULD U ANSWER THIS ???
vladimir1956 [14]

Answer:

B.lightning striking a tree

Explanation:

The crowd dispersing in all directions is not a closed-loop by any means, and students jogging around an oval track as well is not a closed-loop, and also not a cross country run from one point to another. However, the lightning striking a tree is a closed loop that best models a circuit. And as lightning strikes the tree, like a closed circuit, tree catches the fire, or in circuitry words, the current is generated, and tree catches the fire due to it, just like bulb starts glowing.

3 0
3 years ago
Amy would like to find all records that were delivered on August 8, 2008. Her database has a field that tracks when the items we
denpristay [2]
Conduct a query and set the criteria as = August 8, 2008. I'm not sure if this is the right answer, but that's what I think it is.
7 0
3 years ago
Read 2 more answers
Indica las ventajas del sistema biela manivela.
leva [86]

Answer:

El atributo más importante de una manivela de rendimiento del mercado de accesorios es que a menudo tiene más trazo, por lo que puede crear un paquete de stroker y así agregar más pulgadas cúbicas en el motor. Otra ventaja es tener una versión que no está disponible de otra manera, como una manivela 360 (3,58 pulgadas de carrera) con una pequeña red (tamaño 318/340).

5 0
3 years ago
Other questions:
  • How long does it take to wire a house?
    14·2 answers
  • Assume the existence of a Window class with a function getWidth that returns the width of the window. Define a derived class Win
    15·1 answer
  • The WorkOrders table contains a foreign key, ClientNum, which must match the primary key of the Client table. What type of updat
    7·1 answer
  • O novo funcionário da equipe de desenvolvimento de sistemas está aprendendo os termos mais utilizados no dia a dia da empresa. A
    7·1 answer
  • How many instructions can the microprocessor execute each second if the assembly line is present?
    12·1 answer
  • When using correct ergonomic technique be sure to
    6·2 answers
  • Assume that an int variable counter has already been declared. Assume further a variable counterPointer of type "pointer to int"
    10·1 answer
  • Are storage devices input devices
    8·1 answer
  • Write a program that reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicatin
    15·1 answer
  • Write a pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!