This document outlines an assignment for a PHP & MySQL class at Jamhuriya University of Science & Technology. The assignment contains 11 questions involving writing programs to perform arithmetic operations, comparisons, divisibility checks, even/odd number printing, reverse number calculation, common factors, LCM calculation, multiplication tables, prime number printing, and factorial calculation. Students are to submit the assignment by October 07, 2021.
This document outlines an assignment for a PHP & MySQL class at Jamhuriya University of Science & Technology. The assignment contains 11 questions involving writing programs to perform arithmetic operations, comparisons, divisibility checks, even/odd number printing, reverse number calculation, common factors, LCM calculation, multiplication tables, prime number printing, and factorial calculation. Students are to submit the assignment by October 07, 2021.
This document outlines an assignment for a PHP & MySQL class at Jamhuriya University of Science & Technology. The assignment contains 11 questions involving writing programs to perform arithmetic operations, comparisons, divisibility checks, even/odd number printing, reverse number calculation, common factors, LCM calculation, multiplication tables, prime number printing, and factorial calculation. Students are to submit the assignment by October 07, 2021.
1. Write a program that calculates all arithmetic operations (+, -, *, /, %).
2. Write a program that compares three integer numbers then specifies and prints the greatest and smallest one. 3. Write a program that prints whether the number is divisible by 3, 5, both, or none of them. 4. Write a program that prints even numbers from 35 to 7. 5. Write a program that prints numbers divisible by 2 and 5 at the same time from 50 to 2. 6. Write a program to find reverse of a given number (for example, reverse of 12345 = 54321). 7. Write a program to find common factors of two numbers (for example, common factors of 42 and 70 are: 2, 7 and 14). 8. Write a program that calculates lowest common multiplier (LCM) of two integer numbers (for example, LCM of 8 and 12 = 24). 9. Write a program that produces multiplication table (up to 12*12) using nested loops. Format the output in a table. 10. Write a program that prints prime numbers from 10 to 50. 11. Write a program that calculates the factorial of numbers from 2 to 10.