seperating buttons???

I'm fairly new to using arduino and im trying to make a basic trivia game... but whenever i click one button the serial.println for both shows up!! I had the same problem with using LEDS when i clicked either button both LEDS turned on. How would i go about fixing this?
Here's my code so far...

int buttonstate;
int buttonstateR;
void setup() {
Serial.begin(9600);
pinMode(13, INPUT);
pinMode(12, INPUT);
}

void loop() {
buttonstate = digitalRead(13);
buttonstateR = digitalRead(12);

if(buttonstate == LOW){
Serial.println("a");
}
else
{
Serial.end();
}

if(buttonstateR == LOW){
Serial.println("b");
}
else
{
Serial.end();
}
}

pinMode(13, INPUT);
pinMode(12, INPUT);

How are your buttons wired? Do you have pull-up or pull-down resistors? Normally one would use the built-in pull-ups to avoid needing external resistors.

Serial.end();

Are you sure you really want to call that? What do YOU think it does?

I have pull-down resistors… how would i use the built in pull-up? And lol! I’ll definitely remove serial.end, thanks!

Read this discussion on switches:
http://www.gammon.com.au/forum/?id=11955

Turn on pull-ups:

pinMode(13, INPUT_PULLUP);
pinMode(12, INPUT_PULLUP);

Edit, FYI

2017-08-05_20-33-24.jpg

avparker:
I have pull-down resistors.. how would i use the built in pull-up? And lol! I'll definitely remove serial.end, thanks!

If you're using pull-down configuration then those buttons should read LOW when they are NOT pressed. SO it should spam 'a' and 'b' to the serial monitor until you press a button and shut down the serial link.

It works!!! That was such a simple fix wow, thank you so much!