First, what programming software are you using? easy c or robot c?
Second, how far have you gotten? Do you have standard driver control code or a few autonomous routes written, and struggling to deal with a competition template? Or have you just started programming?
The Pneumatics part, there are a few wonderful programming tutorials on youtube. They are not hard to find and you may take a look.
The motor encoder part, what are they used for? Can you describe a little more?
Cody is right. You cannot throw a question on the forum and expect others to teach you. Others can help but not teach you from nothing. There are a few of great videos online about easy c and robot c that can get you started. And I believe this is the way we have all been through, struggling for hours to learn a thing in program and there is hardly a shortcut.