four phph assignemnts a 04 a07

A-04: First PHP Program to Write

The Task:

Write a program that prints the numbers from 1 to 100.
But for multiples of three print the word “Alpha” instead of the number
and for the multiples of five print “Beta”.
For numbers which are multiples of both three and five print “AlphaBeta”.

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

Name your file “alphabeta.php“.

A-05: Sum 1 to 25 using WHILE

Copy it as well into a file “sum_1_to_25_using_while.php“.

Look up the syntax of the PHP statement WHILE on both w3schools.com and php.net.

Change the program in the sum_1_to_25_using_while.php file to use the PHP statement WHILE instead of For.

Rename the .php file appropriately for this change. Immediately after the opening “<? “, add a comment line with your name.

A-06: Sum 1 to 25 using DO-WHILE

Copy it into a new file “sum_1_to_25_using_do_while.php“.

Look up the syntax of the PHP statement DO-WHILE on both w3schools.com and php.net.

Change the program in the sum_1_to_25_using_do_while.php file to use the PHP statement DO-WHILE instead of For.

Rename the .php file appropriately for this change. Immediately after the opening “<? “, add a comment line with your name.

A-07: Sum from X to Y given by the user

Review the completed sum-from-1-to-25 in all 3 formats (For, While, Do-While).
Study the Form-and-Receiver example examined in class.

Pick one from the For, While, Do-While set and combine it with the Form-and-Receiver example to write a new program. Call the new program “sum_from_x_to_y.php“.

This program is to ask the user for two numbers (like the form input example). Given the two numbers received, the program is to SUM all the numbers from the First number to and including the Second number.
(This is the Sum 1 to 25 algorithm, except that the user is giving you the start and end numbers for the summation.)

After displaying the result, the program must give the user the option to do it again with newly-input numbers.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.