Coding Help

Togepiover 10 years ago

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
Sonrioover 10 years ago
Just noticed this ends on april fools. Is togepi going to reveal that shes been fooling us all along??
deleteddeletedover 10 years ago
Yeah I wouldn't recommend trying to learn both fully at the same time, but an occasional comment here and there will probably give you a good enough idea of c++ to know what you're doing
deleteddeletedover 10 years ago
So what's the difference between the languages?
I know that C++ apparently allows you to do anything, so are other languages limited somehow?
Togepiover 10 years ago
I'm hesitant to say that I'm good at Java, but I'm not bad. We have a lot of other things to learn, so throwing one more language on top of what I've got will make me jump out a window.
deleteddeletedover 10 years ago
In my experience you learn the exact same stuff conceptually, and the syntax isn't too far off. If you get good at one, you'll pick up the other reaaaally easily.
Togepiover 10 years ago
Natan
Togepi
Natan
mist
im derailing tghis thread
no one give this attention

o
wait
Idk who you are Natan but you are feisty.
im just bored and found my way here

also c++ rocks and its very similar to java you could very easily do it
Yeah it seems pretty similar. Might be something I will throw some time into after I'm done with all of this.
deleteddeletedover 10 years ago
I'm loving C++
Togepiover 10 years ago
joshua
Togepi
joshua
*goes back to writing ruby code*
*throws variables at a blank wall* WHATEVER STICKS!!
That's my entire coding process, not like I write tests.
deleteddeletedover 10 years ago
Togepi
Natan
mist
im derailing tghis thread
no one give this attention

o
wait
Idk who you are Natan but you are feisty.
im just bored and found my way here

also c++ rocks and its very similar to java you could very easily do it
deleteddeletedover 10 years ago
Togepi
joshua
*goes back to writing ruby code*
*throws variables at a blank wall* WHATEVER STICKS!!
That's my entire coding process, not like I write tests.
Togepiover 10 years ago
Natan
mist
im derailing tghis thread
no one give this attention

o
wait
Idk who you are Natan but you are feisty.
deleteddeletedover 10 years ago
joshua
*goes back to writing ruby code*
Teach me senpai.
deleteddeletedover 10 years ago
mist
im derailing tghis thread
no one give this attention

o
wait
Togepiover 10 years ago
joshua
*goes back to writing ruby code*
*throws variables at a blank wall* WHATEVER STICKS!!
deleteddeletedover 10 years ago
*goes back to writing ruby code*
Togepiover 10 years ago
I am in awe that you can throw a semi-colon in and that [redacted] will compile. Pls teach me C++
1
deleteddeletedover 10 years ago
joshua
#include
using namespace std;

int main()
{
int x;
cin >> x;

for (; x > 20; x--)
{
cout << x;
}

return 0;
}

Something like this will work with values greater than 20, and will reduce them. What is it supposed to do I'm too lazy to read. Is this a homework problem of some sort?
THANK YOU !
I was forgetting the semicolon before doing the rest of for loop, ._.
deleteddeletedover 10 years ago
Natan
1. what boo said
2. you could just use a while loop

while(x < 20) {
cout << x;
x++;
}
I know I can use while, but I want to use for.
deleteddeletedover 10 years ago
#include
using namespace std;

int main()
{
int x;
cin >> x;

for (; x > 20; x--)
{
cout << x;
}

return 0;
}

Something like this will work with values greater than 20, and will reduce them. What is it supposed to do I'm too lazy to read. Is this a homework problem of some sort?
1
Togepiover 10 years ago
But your loop will not end the way you have it now.
deleteddeletedover 10 years ago
Yes i have to declare x before i can cin>> it
deleteddeletedover 10 years ago
im derailing tghis thread
deleteddeletedover 10 years ago
1. what boo said
2. you could just use a while loop

while(x < 20) {
cout << x;
x++;
}
deleteddeletedover 10 years ago
You're declaring x twice? why?

Your loop will never terminate, you're saying if x > 20 then continue, and you keep incrementing x.
Togepiover 10 years ago
mist
Togepi
Idk who you are but hi!!
wtf im me
Hiiii