1. A prime number is an integer that is divisible only by 1 and itself. For example, 5 is a prime number, since 1 and 5 are the only divisors that result in a remainder of 0. Write a program that displays all the prime numbers from 2 to a given integer n.
2. Define a class of pyramids that use asterisks to display themselves. The height of a pyramid is given by the number of rows of asterisks in its display. For example, a pyramid having three rows would appear as follows:
*
***
*****
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here