I'm going to post here when I can't figure out certain aspects of Java. I don't know how many of you know the language well, but help will be appreciated as I go through this bootcamp.
Also an excuse for me to post a countdown until Doomsday.
Poll
If you code, what language do you prefer?
Python31%19
C++21%13
Java16%10
Other8%5
Ruby6%4
Combo (the right answer)6%4
C# (lol)5%3
Javascript3%2
deleteddeletedover 10 years ago
can't you do for(x=x; x>20; x++)
you should note that if x is greater than 20, then you have an infinite loop.
You have to declare the variable type before you assign it? In Java it would be int x = System.in or whatever, but I don't see how it would run because I would think the compiler would break at int x since it's not doing anything but declaring the type rather than assigning a value.
deleteddeletedover 10 years ago
wtf im me
2
deleteddeletedover 10 years ago
int main() { int x; cin >> x;
for (x > 20; x++) { cout << x; }
return 0; } and if i dont decalre it in the loop, like this, the code wont run at all. This is why i need help xD
deleteddeletedover 10 years ago
Because I have to declare x before I cin>> x; and I want to do it outside the loop
Mind explaining the For loop to me in c++. I have this problem where i cannot get it to work unless i specify the value before. If I want to input the value using cin >>, for some reason it won't register properly in the for loop.