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
-
AdrianD3618y@BluhhBluhhTom the first if should be a while otherwise you are getting only one ++. XD Welcome to devrant. :P
-
I noticed this after posting and was hoping nobody would spot it :') Nice one :) @AdrianD
-
batsm238yint main()
{
for(;true;) //( ͡° ͜ʖ ͡° )
{
boolean NeedPoints = true;
int Points = 0;
if (NeedPoints)
{
Points++;
if (Points > 10)
{
CreateAvatar();
NeedPoints = true;
}
}
}
}
@BluhhBluhhTom -
def main():
dev = Dev()
dev.need_points = True
while dev.need_points:
dev.points += 1
if dev.points == 10:
dev.avatar = Avatar() -
batsm238yvoid main()
{
boolean NeedPoints = true;
int Points = 0;
while(!NeedPoints)
{
if (NeedPoints)
{
Points++;
if (Points > 10)
{
CreateAvatar();
NeedPoints = false;
return();
}
}
}
} -
so you reached your goal
now your just wasting system resources
should I downvote or? -
alphinex1278yThis seems to be an great way to get some points on devrant. So let's try it in Java:
public My class()
{
int points = 0;
PointCollector pc = PointFactory.newPointCollector("devrant");
while(pc.collect())
{
points++;
}
if(points < 10)
{
// Insert ProblemFactory
}
}
I think this function is absolutely not working. But improved Java classes/functions are difficult. At least, I tried.
int main()
{
bool NeedPoints = true;
int Points = 0;
if (NeedPoints)
{
Points++;
if (Points > 10)
{
CreateAvatar();
NeedPoints = false;
}
}
}
undefined
iwantanavatar
helpmepls