Godly T.Alias - B.Tech CSE,
National Institute of Technology Calicut
Follow me on GitHub
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime.
Prime number program in C++prime number is only divisible by 1 and itself, we can easily write prime number program in c++, just check number is not divisible by any other numbers except 1 and number itself.
Prime number program in C++A prime number is a natural number which is greater than 1 and these numbers are only divisible by 1 and itself number. In programming point of view, we check condition number is divisible by other number or not except 1 and number itself. If number is not divisible by other number than that number is prime number.
can you write the program with using only while loop?
You mean avoid the usage of do-while ??