Loops | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Loops

For counter 1 to 0 what is the possible values of the count (all) ?

3rd Aug 2020, 9:21 AM
Sanjay Kamath
Sanjay Kamath - avatar
7 Answers
+ 7
This question should be reworked. Please give a more clear description or provide a code snippet. Also include programming language in tags. Thanks!
3rd Aug 2020, 9:51 AM
Lothar
Lothar - avatar
+ 5
Petr -1 is the step... return is random ...
3rd Aug 2020, 11:16 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 4
Sanjay Kamath step may be not int . For ex step=-0.2, then result will be 1, 0.8, 0.6, 0.4, 0.2
3rd Aug 2020, 11:54 AM
Petr
+ 2
Sanjay Kamath Range(start,stop,step). Start is 1, stop is 0. What is step?
3rd Aug 2020, 10:11 AM
Petr
+ 2
What about C++ 😶
4th Aug 2020, 10:50 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 2
Sanjay Kamath for(float i=1;i>0; i+=-0.2)
4th Aug 2020, 12:39 PM
Petr
+ 2
Petr I would use a while loop here ....
4th Aug 2020, 1:52 PM
Sanjay Kamath
Sanjay Kamath - avatar