ANSWERS: 7
-
Sorry. I'm not in school, nor is it in my job description. YOU do it.
-
No thanks. Besides, if it's just between 1 and 50, you could probably do it faster just using your brain. There aren't that many prime numbers between 1 and 50
-
main() { cout << "all the prime numbers between 1 and 50."; } Do I win? ;-) Seriously, just loop from 2 to 50 and make an inner loop starts at 2 and goes up to the square root of the outer loop's count, and checks to see if that inner loop's variable will divide evenly into the outer loops variable. If it does, it's not a prime, and you can move on to the next outer loop count. Have fun.
-
https://pastebin.com/a5G8xXt9 The code is in the link above
-
#include using namespace std; int main() { int p_count=0; int factors=0; cout
-
#include using namespace std; int main() { int p_count=0; int factors=0; cout
-
I dont know but the whole answer is not coming and search program of PRIME NUMBER so that you understand the logic and then apply it in your own program
Copyright 2023, Wired Ivy, LLC