Help me!! Please!! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

Help me!! Please!!

int main() { int chyslo; int sum = 0; int i = 0; do { cout << "\nPlease input chyslo"; cin >> chyslo; ++i; // there should be check or index that is variable and is a prime number. Help me!! fix code!! // if it is simply the amount increased by the introduction of number Hep me!! fix code!! } while (chyslo!=0); system("pause"); return 0; }

7th Jan 2017, 4:52 PM
Alex Silin
Alex Silin - avatar
4 Answers
+ 1
do you want to validate wether chyslo is a prime number?
7th Jan 2017, 4:57 PM
Master Tila
Master Tila - avatar
+ 1
go to code play ground, and check most recent codes, it might help
7th Jan 2017, 5:42 PM
Master Tila
Master Tila - avatar
0
yes
7th Jan 2017, 5:23 PM
Alex Silin
Alex Silin - avatar
0
understand
7th Jan 2017, 5:45 PM
Alex Silin
Alex Silin - avatar