PHP Assignment 1 Basic Programming
PHP Assignment 1 Basic Programming
PHP ASSIGNMENT -1
1. Create two integer variables (a and b) after that assign value for them. Then swap
value of a and b and print it to screen.
Hint: Using a c variable to transfer value temporary.
2. Write an application permit user input three numbers as math, physics, and chemistry.
Output average and rank according to the following:
AVG Rank
>=8.0 A
>=6.5 B
>=5.0 C
<5.0 D
Hint: Declare average and rank variable and calculate value for them.
5. Write a program to calculate and display sum of first 50 integer numbers to the
screen.
1
iViettech Education
Professional Programmer Training Center
10. Write a program to accept an integer number and print the triangle
as below:
Example:
N=3
*
**
***
N=4
*
**
***
****
11. Write a program to accept an integer number and print the triangle
as below:
Example:
N=3
*
**
***
N=4
2
92-Quang Trung –Da Namg. Tel: 05113.888 279
PHP Assignment
*
**
***
****
The End
3
iViettech Education