Playground.arduino.cc will be read-only starting December 31st, 2018. For more info please look at this Forum Post

int a = 1234; int num1; num1=a%10; serial.println(num1);