Question

Php

Write a php program to print the even numbers between 50 and 100 

1 0
Add a comment Improve this question Transcribed image text
Answer #1
for ($i = 50; $i <= 100; $i++) {
   if ($i % 2 == 0) {
       echo $i . "<br>";
   }
}


answered by: codegates
Add a comment
Know the answer?
Add Answer to:
Php
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a PHP program using to display all the even numbers between 1 and 100

    Write a PHP program using to display all the even numbers between 1 and 100

  • 1. Print out information of PHP use phpinfo() function. 2. Write a program that check and...

    1. Print out information of PHP use phpinfo() function. 2. Write a program that check and print odd / even numbers (from number 1 to 100 using for/while loop). Display the results within an HTML table with 2 columns as shown below: NUMBERS RESULTS 1 ODD 2 EVEN 3 ODD HINT: use <table> tags to create a table, <th> tags for ‘Numbers’ and ‘Results’. Wrap code PHP inside HTML code. For example: ​<html> ​​<title>CHECK ODD or EVEN</title> ​​<body> ​​​<table> ​​​​<?php...

  • Identify and correct the error in each of the following PHP code examples: a) <?php print(...

    Identify and correct the error in each of the following PHP code examples: a) <?php print( "Hello World" ); > b) <?php $name = "Paul"; print( "$Name" ); ?> Describe how input from an HTML5 form is retrieved in a PHP program. Describe how cookies can be used to store information on a computer and how the information can be retrieved by a PHP script. Assume that cookies are not disabled on the client.

  • Write a Java program in Eclipse. . Write a Java program that: 1. Creates an array...

    Write a Java program in Eclipse. . Write a Java program that: 1. Creates an array of 100 integers. Initialize the array to have all zeros. 2. Puts even numbers starting from 6 (excluding multiples of 12) into the first 50 slots of the array above. So numbers 6,8,10,14,16,18,20,22,26, etc. go into the first 50 positions in the array. Print the array. 3. Puts random numbers between 45 and 55 into the second 50 slots of the array above (second...

  • Write a program that check odd / even numbers (from number 1 to 100). Display the...

    Write a program that check odd / even numbers (from number 1 to 100). Display the results within an HTML table with 2 columns: one for odd number and one for even numbers. NUMBERS RESULTS ODD EVEN ODD 2 HINT: use <table> tags to create a table, <th> tags for 'Numbers' and 'Results'. Wrap code PHP inside HTML code. For example: <html> <title>CHECK ODD or EVEN</title> <body> <table> ?php echo "<tr><td>l</td><td>Odd</td</tr>"; </table> </body </html 2. Do the following steps in...

  • مرحبا ممكن حل هذا السؤال ضروري لمادة البرمجه ضروري Q4/ Answer two of the following:- 10...

    مرحبا ممكن حل هذا السؤال ضروري لمادة البرمجه ضروري Q4/ Answer two of the following:- 10 points 04// answer two of the following:- 1- Write and draw an algorithm to print all even numbers between (20) and (50). 2- Write program in c++ to find the maximum between three numbers. 3- Write program in c++ to print the days of week as number from(1 to 7) then print out the corresponding day in this week using (while...loop) 1 Add file

  • Use php Create a file to write a program of 30 city name and populations Using...

    Use php Create a file to write a program of 30 city name and populations Using two files Print using associative array Output should be like Cities: Name. Population Daka. 13 millions

  • write program above in C only Write a program to find statistics on some random numbers....

    write program above in C only Write a program to find statistics on some random numbers. Seed the random number generator with time. In a for loop generate 12 random numbers between the values of 2 and 20. Print the numbers. As the numbers are generated, find the following: the number of even numbers (those evenly divisible by 2) e the sum of the even numbers the product of the even numbers the maximum value of all the numbers e

  • Q1: Write an algorithm and sketch the flowchart to read 20 numbers for x and finding...

    Q1: Write an algorithm and sketch the flowchart to read 20 numbers for x and finding the number of times that the number 100 is repeated between these numbers. (12 marks) Q2: What is the difference between prefix decrementer (- - i) and postfix decrementer (i - -) explain using examples. Q3: C++ includes a very special operator called the ternary operator. Explain with example how this operator used? Q4: Write C++ Program which output this result ******50 *****500 ****5000...

  • PHP Program Complete PHP code (and HTML Code) Using functions to abstract the logic away from...

    PHP Program Complete PHP code (and HTML Code) Using functions to abstract the logic away from the rest of your code makes it easier to read and maintain. PHP provides a number of useful functions as standard, and this week you will use some of these functions to obtain information. Create a program that compares two strings provided on an HTML form, and determine if the two strings are anagrams. The HTML page asks the user for the input strings,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT