What does that long minus after the variable mean? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What does that long minus after the variable mean?

int x = 5, y =1; do { y++; } while (x-- >= 0); // what is this minus sign doing there? System.out.print(y); found it in a challenge question by Petér Gyöngyik. And this isn't the only question I found this in... @Cлaвeн Ђервида thx, i haven't seen that this minus are two minus after eachother. Soluion: Actually it is pretty hard to tell the difference between one or two minus signs in challenge questions on my tablet.

16th Apr 2018, 12:39 PM
Johann Leis
Johann Leis - avatar
3 Answers
+ 1
x-- maybe?
16th Apr 2018, 12:54 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
0
Can you give an example code?
16th Apr 2018, 12:40 PM
Jordan Patterson
Jordan Patterson - avatar
0
I test that is cpp and it show me a error!
16th Apr 2018, 12:53 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar