You are on page 1of 1

Jamhuriya University of Science & Technology

Faculty of Computer Science & IT

Course Title: PHP & MySQL

Class: CA187

Activity: Chapter 3 assignment

Due date: 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.

END

You might also like