Ranter
Join devRant
Do all the things like
				++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
				Sign Up
			Pipeless API
				From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
				Learn More
			Comments
		- 
				
				static void printTo100(int step) {
System.out.println(step);
int failsAt100 = 1/ (100 - step);
printTo100(step+1);
} - 
				
				
AllenII16148y@danielspaniol. I was thinking recursion was the obvious solution myself
Never said it couldn't crash 😂😂😂 - 
				
				
Wack61258y@danielspaniol I'd additionally wrap it in a `try { ... } catch(Exception e) {}` block. - 
				
				void printnum(uint max)
{
If (max > 0)
printnum(max-1);
cout << max << endl;
}
And call a printnum(100); - 
				
				
AllenII16148y@CodaKairos ERR: requirement not met
Requirement 'no conditions' violated by 'if' keyword - 
				
				@CodaKairos there is still a condition in there. A shortend one but still not right ;)
 - 
				
				
Wack61258y`X ? Y : Z` is just a short form for `if (X) { Y } else { Z }` so again, there's a condition. - 
				
				
AllenII16148y@Jop- what they said, concerning the ternary.
Correct, for taking the requirement literally 😂😂 - 
				
				
watzon45578y 
Related Rants


Stackoverflow.
I'll start implementing this in my apps too.
Master Coder Unlocked!
undefined
hardcore
programming
hack
coder