+ 1

How do I write a c++ program to output all even numbers, all odd numbers and all prime numbers within a given range?

23rd Apr 2018, 6:41 PM
STT
STT - avatar
4 Antworten
+ 3
Clue for working out if a number is even or odd: investigate the % operator
23rd Apr 2018, 7:46 PM
Emma
+ 2
Thanks
25th Apr 2018, 7:06 AM
STT
STT - avatar
+ 1
I did the prime numbers, I'll let you do the others :) https://code.sololearn.com/c922n6tSOtex/?ref=app Feel free to ask if you're confused about anything.
23rd Apr 2018, 7:30 PM
Dennis
Dennis - avatar
+ 1
try to use for while loop
21st May 2018, 2:50 AM
Mikeivan
Mikeivan - avatar