0

how to write a code in cpp that determines whether the input integer is prime number or not??

1st Oct 2019, 9:38 AM
Abdullah Khalid
2 Answers
+ 4
Prime numbers are ones that are divisible only by 1 and itself. Use this as the condition to check. The number that can be divisible means its remainder is 0. Give the hints above and you can try to program it by yourself.
1st Oct 2019, 9:59 AM
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ
ä½ ēŸ„é“č¦å‰‡ļ¼Œęˆ‘也ę˜Æ - avatar
+ 1
Go to Code Playground and use the search feature using 'prime' as search term, you will find loads of examples to learn from šŸ‘
1st Oct 2019, 9:52 AM
Ipang