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.
If you code, what language do you prefer?
19
Python
13
C++
10
Java
5
Other
4
Ruby
4
Combo (the right answer)
3
C# (lol)
2
Javascript
deletedover 8 years
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.
deletedover 8 years
wtf im me
deletedover 8 years
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
deletedover 8 years
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.