Assalamu Alaikum. Hope, you all are well by the grace of Almighty ALLAH. Today we learn how to find out the minimum prime number between limits. Take a look at the problem.
Problem: Write a program that prints the minimum 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.
Problem: Write a program that prints the minimum 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