Assalamu Alaikum. Hope, you all are well by the grace of Almighty ALLAH. Today we learn, how to find out the maximum prime number between two limits. Take a look at the problem.

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

Now, take a look at the program.

**Problem:**Write a program that prints the maximum prime number between X and Y, where Y > X. User will input the value of X and Y. If X is lower than Y a message will be given "**Invalid Range**".**Solution:**A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.

Now, take a look at the program.

We can also do this program by using a flag. Take a look at the program.

Thank you all..

## 0 comments:

## Post a Comment