Most Helpful Girl
It takes 66 day s to form a habit and about 21 days to break it.. so the odds are in your favor! Set reminders on your phone to sit up straight. IF you work at a desk, keep a post it note that says to sit up. Get your friends to help you. In less than a month you'll be sitting up straight.
Most Helpful Guy
I feel like it's a pretty common problem when one is tall.
Part of it is being conscious that you are slouching and trying to sit/stand up straight. It will feel a bit like you are puffing out your chest when you stand up straight, but that's alright. Just go for it.
Another part of it is working up the muscles in the shoulders there to help support you and get you flexible. I have a friend who was a sloucher and what he did was set a timer to go off three times per day. Each time the timer went off, he'd stand up and basically roll his shoulders for 10 times each direction. Over a period of time, this gradually helped him fix his slouching habit.
As for sitting, I would suggest sitting far back in your chair rather than at the edge. It places less pressure on the pelvic bone. Sit in a way where the back of the seat helps keep you upright.
Another thing to take note of is how much weight you are carrying in your backpack, and more importantly, how you are carrying your backpack. If you have the straps low, it really makes it difficult to keep good posture. People in high school were notorious of it because they thought it looked more fashionable if you didn't have the straps properly fitted or something lol.
Likewise, I personally find it a good idea to place a textbook or something hard/flat near the side of the backpack that hits your back. That way, it is a rigid surface and won't bend as much if your posture goes bad.
It seems like a lot of stuff to do now, but that's alright. The important thing is that you start making a conscious effort to do them. For the first however many days, it will take some time to get used to it. You'll be constantly having to check yourself. But, after some time and dedication, you'll start to form this as your new habit and your bad posture will start to fade :D